A developer is configuring a continuous delivery pipeline in AWS CodePipeline to deploy a serverless web application. The pipeline is created in the us-east-1 region. The release process must deploy AWS CloudFormation stacks to both us-east-1 and us-west-2 during the deployment stage. The pipeline execution fails during the cross-region deployment action because of issues with artifact access between regions. Which two configurations must the developer implement to support this cross-region deployment?
- Configure a customer managed AWS KMS key in both the us-east-1 and us-west-2 regions to encrypt and decrypt the deployment artifacts.Answer
- Include an Amazon S3 artifact store bucket in each region where a pipeline action is executed within the pipeline definition.Answer
- CConfigure the pipeline to use the default AWS managed S3 key (aws/s3) in each region to automatically handle cross-region artifact encryption.
- DStore cross-region target deployment credentials in AWS Systems Manager Parameter Store and enable native automatic rotation of the credentials.
- EUpdate the IAM trust policy of the CodePipeline service role to allow the AWS CloudFormation service principal to directly assume the role.
Answer
Configure a customer managed AWS KMS key in both the us-east-1 and us-west-2 regions, and include an Amazon S3 artifact store bucket in each region where a pipeline action is executed.
To configure cross-region actions in AWS CodePipeline, a regional S3 artifact store bucket must be configured in each region where actions are executed. Additionally, a customer managed AWS KMS key must be configured in each region to encrypt and decrypt artifacts stored in these regional S3 buckets because default AWS managed keys are not supported for cross-region actions.
Step-by-Step Solution
Key Concept
AWS CodePipeline Cross-Region Action Configurations