Skip to content

Deploy an application to multiple regions/accounts from a single pipeline, but having an own approval for every region/account

0

We want to deploy our application to multiple regions (later maybe multiple accounts). This works fine using the Wave from a Codepipeline. Now we need every region to have an own manual approval, so for example, we want to deploy the changes to eu-central-1 and test them, later we want to deploy them to more regions, but never all at once. The order in which we want to approve the regions, is not set, so best would be they get all deployed in paralel. And we dont want to have multiple pipelines.

Does someone have an idea how this can be possible ?

1 Answer
1

Hello,

Please try this solution.

To set up a single AWS CodePipeline that deploys to multiple regions with individual manual approvals, you should start by creating the pipeline with a source stage to fetch your code and a build stage to prepare your application. For each region you want to deploy to add a separate stage that includes a manual approval action followed by the deployment action (like using CloudFormation or CodeDeploy). Set these regional stages to run in parallel, so they can await approval independently. When deploying to different regions, your pipeline's IAM roles have the necessary cross-region permissions. This setup allows you to approve and deploy to each region separately and flexibly, without the need for multiple pipelines.

if you need more information, please go through the AWS Document link you will get more information.

https://aws.amazon.com/blogs/devops/using-aws-codepipeline-to-perform-multi-region-deployments/

https://medium.com/@christopheradamson253/building-a-multi-region-application-on-aws-20341952e480

https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/deploy-code-in-multiple-aws-regions-using-aws-codepipeline-aws-codecommit-and-aws-codebuild.html

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Thanks for your answer.

    Set these regional stages to run in parallel, so they can await approval independently. Exactly this is the problem. Once i set the manual approval the region dont gets deployed, until every single manual approval is pressed. See image the following image https://imgur.com/a/T95mRdo

  • CodePipeline where each region has its own separate pair of stages one for manual approval and one for deployment. Arrange these stages in parallel. This setup ensures that each region's deployment can proceed independently as soon as its specific manual approval is granted, without waiting for approvals in other regions. This way, you can control deployments per region individually and in parallel.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.