This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net/http" | |
) | |
func handler(w http.ResponseWriter, req *http.Request) { | |
// Request AWS metadata for Availability zone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: "2010-09-09" | |
Parameters: | |
TableName: | |
Type: String | |
ClusterSize: | |
Type: Number | |
Subnets: | |
Type: List<AWS::EC2::Subnet::Id> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: "2010-09-09" | |
Resources: | |
Pool: | |
Type: AWS::Cognito::UserPool | |
PoolClient: | |
Type: "AWS::Cognito::UserPoolClient" | |
Properties: | |
UserPoolId: !Ref Pool | |
ExplicitAuthFlows: | |
- ALLOW_USER_PASSWORD_AUTH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ecs register-task-definition --profile YOUR_PROFILE \ | |
--region YOUR_REGION \ | |
--cli-input-json file://taskDefinition.json | |
aws ecs create-service --profile YOUR_PROFILE \ | |
--region YOUR_REGION \ | |
--cluster mycluster \ | |
--launch-type FARGATE \ | |
--task-definition YOUR_TASK_DEF \ | |
--desired-count 1 \ | |
--platform-version LATEST \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd FlaskApp | |
# That's some hell of bash pipelining, but I'm too lazy to copy/paste ECR uri. | |
REPO=$(aws ecr describe-repositories --profile YOUR_PROFILE \ | |
--region YOUR_REGION \ | |
--repository-names YOUR_REPO_NAME | \ | |
jq .repositories[].repositoryUri | \ | |
sed -e 's/^"//' -e 's/"$//') | |
docker build -t ${REPO}:v1 . | |
$(aws ecr get-login --no-include-email --region YOUR_REGION --profile YOUR_PROFILE) |