AmazonAmazon DevOps Engineer Professional DOP-C02 Certification·EN·Updated 4 Aug 2026
A CodePipeline has a CloudFormation deploy action that creates an S3 bucket and a later S3 deploy action that must upload the build artifact into that created bucket. How should the pipeline be configured so the S3 deploy action uses the bucket created by the CloudFormation action? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Add an output named BucketName to the CloudFormation template and set its value to reference the created S3 bucket. Configure the CloudFormation action's namespace in the pipeline to StackVariables., Configure the build artifact from the build action as the input to the CodePipeline S3 deploy action. Configure the deploy action to deploy to the S3 bucket by referencing StackVariables.BucketName..
Why this is the answer
The CloudFormation action can output values from the deployed stack. By adding an output named BucketName in the CloudFormation template that references the created S3 bucket, and configuring the CloudFormation action's namespace to StackVariables, the bucket name becomes accessible as an action variable. The S3 deploy action can then reference this variable as StackVariables.BucketName to identify the target bucket. The build artifact from the build action must also be provided as an input to the S3 deploy action, as this artifact contains the content to be uploaded.
The incorrect options propose using AWS Systems Manager Parameter Store or incorrect artifact configurations, which are not the standard or most direct way to pass output values between actions within CodePipeline.