How to Test CloudFormation Templates in Primary and DR Regions with CodePipeline?
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?
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam tests whether you recognize StackSets as the native multi-Region deployment mechanism; the trap is assuming that a single account without AWS Organizations cannot use StackSets, when self-managed StackSets works perfectly for deploying to a single account's multiple Regions.
AWS CloudFormation StackSets can deploy, update, or delete stacks across multiple Regions in a single operation, even within one account that does not use AWS Organizations. The community unanimously (100% of votes) agrees that integrating StackSets with CodePipeline is the most operationally efficient way to test templates in both a primary and a disaster recovery Region.
The most tempting wrong answer is C, because CodeBuild can technically deploy CloudFormation templates via CLI scripts in each Region; however, custom per-Region scripting adds maintenance overhead and lacks the single-operation multi-Region orchestration that StackSets provides natively.
Community Discussion (3 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
CloudFormation StackSets extends the capability of stacks by allowing you to create, update, or delete stacks across multiple accounts and Regions with a single operation, as comment [1] quotes directly from the official documentation. Even without AWS Organizations, a single account can use self-managed StackSets to target its own primary and disaster recovery Regions. CodePipeline natively supports CloudFormation StackSets as a deploy action provider, keeping the pipeline declarative and minimizing custom code. Because one pipeline action covers both Regions, this solution meets the requirement with the fewest components and the least ongoing maintenance, making it the MOST operationally efficient option.Why the Other Options Are Wrong
Option A misuses CodeDeploy, which deploys applications to compute targets such as EC2 instances, on-premises servers, Lambda functions, or ECS services — not CloudFormation templates — so it does not fit the use case at all. Option C could technically work by having CodeBuild run AWS CLI commands per Region, but it requires custom scripts, per-Region logic, and ongoing script maintenance, which is less efficient than StackSets' built-in multi-Region deployment. Option D is incorrect because Snyk is a third-party security scanning action used to find vulnerabilities in code and dependencies, not a mechanism to deploy or test CloudFormation templates.Community Comment Notes
The vote distribution is 100% for B, showing complete community consensus with no dissenting answers. Comment [1] provides the most value by quoting the StackSets documentation, reinforcing that a single operation can provision stacks into selected targets across specified Regions. Comment [2] points out the key trigger phrase in the question — "primary AWS Region and a disaster recovery Region" — meaning multi-Region deployment, which maps directly to StackSets. Comment [3] simply confirms B, and no comments argue for A, C, or D, solidifying B as the verified correct answer.Official Reference
Exam Strategy
Whenever a question mentions deploying to multiple Regions (or multiple accounts), immediately think CloudFormation StackSets — even for a single account that does not use AWS Organizations, since self-managed StackSets covers that scenario. Eliminate distractors by matching each service to its actual purpose: CodeDeploy targets compute, Snyk scans for vulnerabilities, and CodeBuild requires custom scripting. For "MOST operationally efficient" questions, favor the managed, native solution that accomplishes the goal in the fewest steps.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →