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

A DevOps engineer uses a pipeline in AWS CodePipeline. The pipeline has a build action and a deploy action for a single-page web application that is delivered to an Amazon S3 bucket. Amazon CloudFront serves the web application. The build action creates an artifact for the web application.

The DevOps engineer has created an AWS CloudFormation template that defines the S3 bucket and configures the S3 bucket to host the application. The DevOps engineer has configured a CloudFormation deploy action before the S3 action. The CloudFormation deploy action creates the S3 bucket. The DevOps engineer needs to configure the S3 deploy action to use the S3 bucket from the CloudFormation template.

Which combination of steps will meet these requirements? (Choose two.)

Answer options

Correct answer: B, D

Explanation

To pass variables between actions in AWS CodePipeline, you must define a namespace for the producing action (the CloudFormation deploy action) and declare the value as an output in the CloudFormation template. This allows the S3 deploy action to dynamically resolve the bucket name using the namespace variable syntax (StackVariables.BucketName) while consuming the application build artifact as its direct input. Using Systems Manager Parameter Store is unnecessary and adds complexity compared to CodePipeline's native action namespace variables.