YZ
yzhbankov/aws-sqs-asg-cloudwatch
aws-sqs-asg-cloudwatch
Scalable AWS ECS Fargate services with SQS
Requirements
- Terraform v1.7.5
- provider registry.terraform.io/hashicorp/aws v5.41.0
- Nodejs v20
Build and publish docker image
Requirements
- Specified
DOCKER_HUB_ACCESS_TOKENsecret in GitHub repository secrets. The token is should be taken from your DockerHub account. - Specified
DOCKER_HUB_USERNAMEvariable in GitHub repository variables. The username is should be taken from your DockerHub account. - The
DATABASE_CONNECTION_URIcould be with any default value, the prod value will be generated by terraform on apply stage. - The
REDIS_HOSTcould be with any default value, the prod value will be generated by terraform on apply stage.
Instructions
The build and publish docker image the process is automatically initiated on package version bump triggered by running npm run version:patch or yarn version:patch from the repo root folder.
Terraform deployment
Requirements
- Created AWS account
- Created user with admin rights and downloaded AWS access key for this user
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY - The
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYshould be stored in the GitHub secrets
Instructions
- Create any pull request in GutHub
- Comment in pull request
/plan prod, where/planis the action for terraform andprodin workspace - Check GitHub actions and in case no issues detected proceed with the next step
- Comment in pull request
/apply prod, where/applyis the action for terraform andprodin workspace - Check GitHub action result for errors