AWS Certified Developer – Associate (DVA-C02) — Question 429
A company has implemented a pipeline in AWS CodePipeline. The company is using a single AWS account and does not use AWS Organizations. The company needs to test its AWS CloudFormation templates in its primary AWS Region and a disaster recovery Region.
Which solution will meet these requirements with the MOST operational efficiency?
Answer options
- A. In the CodePipeline pipeline, implement an AWS CodeDeploy action for each Region to deploy and test the CloudFormation templates. Update CodePipeline and AWS CodeBuild with appropriate permissions.
- B. Configure CodePipeline to deploy and test the CloudFormation templates. Use CloudFormation StackSets to start deployment across both Regions.
- C. Configure CodePipeline to invoke AWS CodeBuild to deploy and test the CloudFormation templates in each Region. Update CodeBuild and CloudFormation with appropriate permissions.
- D. Use the Snyk action in CodePipeline to deploy and test the CloudFormation templates in each Region.
Correct answer: B
Explanation
AWS CloudFormation StackSets natively supports deploying stacks across multiple AWS Regions from a single template, making Option B the most operationally efficient choice. Using AWS CodeBuild (Option C) or AWS CodeDeploy (Option A) would require writing custom scripts or using services not designed for template deployment, which increases operational overhead. Snyk (Option D) is a security scanning tool and cannot be used to deploy CloudFormation templates.