Search code examples
amazon-web-servicesamazon-ecsaws-codepipelineecs-taskdefinition

AWS Deploy to multiple ecs in CICD using CodePipeline


I want to configure the CICD using AWS CodePipeline but I want to deploy in multiple environments. How to do that?
Source is same, codebuild can also be same I think, please correct if I am wrong. The difference comes in deploy stage. I want to deploy to two different set of resources i:e ECS Cluster. First deployment is the staging env, I want to check all the resources and logs manually before approving it and then which deploys to Production. Is this possible and how to do this?


Solution

  • Yes, you just need to have multiple phases in the pipeline:

    Source ---> Build ---> Deploy (to staging) ---> Deploy (to production)

    You would add a manual approval action to the final deploy phase.