AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 83

A company is building a new pipeline by using AWS CodePipeline and AWS CodeBuild in a build account. The pipeline consists of two stages. The first stage is a CodeBuild job to build and package an AWS Lambda function. The second stage consists of deployment actions that operate on two different AWS accounts: a development environment account and a production environment account. The deployment stages use the AWS CloudFormation action that CodePipeline invokes to deploy the infrastructure that the Lambda function requires.

A DevOps engineer creates the CodePipeline pipeline and configures the pipeline to encrypt build artifacts by using the AWS Key Management Service (AWS KMS) AWS managed key for Amazon S3 (the aws/s3 key). The artifacts are stored in an S3 bucket. When the pipeline runs, the CloudFormation actions fail with an access denied error.

Which combination of actions must the DevOps engineer perform to resolve this error? (Choose two.)

Answer options

Correct answer: B, E

Explanation

The correct actions are to create a customer managed KMS key that allows the CloudFormation action's IAM roles to decrypt artifacts (option B) and to set up IAM roles in both accounts with the necessary permissions while modifying the S3 bucket policy to allow access (option E). Options A, C, and D do not fully address the encryption and access issues related to the KMS key and S3 artifacts.