This repo is a template for containerized applications deployed with CodePipeline -> CodeBuild -> CloudFormation -> ECS
- Create a Personal Access Token in GitHub for CodePipeline: https://docs.aws.amazon.com/codepipeline/latest/userguide/GitHub-create-personal-token-CLI.html
- Place the Personal Access Token in an SSM Parameter in the desired AWS Account / Region named
/CodePipeline/GitHub
- Create a Username and Personal Access Token on Docker Hub (free-tier user is fine)
- Place the Username in an SSM Parameter in the desired AWS Account / Region named
/CodePipeline/dockerhub-user
- Place the Personal Access Token in an SSM Parameter in the desired AWS Account / Region named
/CodePipeline/dockerhub-password
- Authenticate to desired AWS Account with Administrator Access in your bash shell
- Navigate to root directory of this repository
- Review parameters in
config.sh
and update (if needed) - Run
./init <Branch Name>
("Branch Name" must exist in the repository) - Watch CloudFormation console for progress deploying initializer template (
build/init.yml
) - Watch CodePipeline console for progress of first pipeline run & monitor CodeBuild + CloudFormation progress
- Commit + Push changes to branch in order to trigger a new build
- Delete any objects from S3 Buckets (Build + Web + Web Logs)
- Delete any ECR Container Images
- Delete any Manual Route53 Records (e.g. ACM cert verification CNAMEs)
- Delete the CloudFormation Stack for the deployment
- CodeBuild + CodePipeline + CloudFormation IAM Roles are currently overprivileged and should be scoped better
- Load Balancer should be configured to make a better HA ECS deployment
- Web Stack is currently disabled (commented out) but will enable CloudFront + API Gateway + Lambda (talk to Marty first if you want to explore)
- Load Balancer could be added as an origin behind CloudFront + Route53 Config