nerdexam
AmazonAmazon

SAP-C02 · Question #609

SAP-C02 Question #609: Real Exam Question with Answer & Explanation

The correct answer is B: Implement automated testing using AWS CodeBuild in a test environment. Use CloudFormation. To reduce downtime from CloudFormation template changes in a CI/CD pipeline, implement automated testing in a test environment using AWS CodeBuild and utilize CloudFormation change sets to preview infrastructure changes before deployment to production.

Submitted by packet_pusher· Mar 6, 2026Continuous Improvement for Existing Solutions

Question

A company is using AWS CodePipeline for the CI/CD of an application to an Amazon EC2 Auto Scaling group. All AWS resources are defined in AWS CloudFormation templates. The application artifacts are stored in an Amazon S3 bucket and deployed to the Auto Scaling group using instance user data scripts. As the application has become more complex, recent resource changes in the CloudFormation templates have caused unplanned downtime. How should a solutions architect improve the CI/CD pipeline to reduce the likelihood that changes in the templates will cause downtime?

Options

  • AAdapt the deployment scripts to detect and report CloudFormation error conditions when
  • BImplement automated testing using AWS CodeBuild in a test environment. Use CloudFormation
  • CUse plugins for the integrated development environment (IDE) to check the templates for errors,
  • DUse AWS CodeDeploy and a blue/green deployment pattern with CloudFormation to replace the

Explanation

To reduce downtime from CloudFormation template changes in a CI/CD pipeline, implement automated testing in a test environment using AWS CodeBuild and utilize CloudFormation change sets to preview infrastructure changes before deployment to production.

Common mistakes.

  • A. Adapting deployment scripts to detect and report errors during deployment is reactive; the goal is to reduce the likelihood of errors causing downtime before deployment, which automated testing and change sets achieve.
  • C. IDE plugins for syntax checking are basic validation and do not cover logical errors, resource dependencies, or the impact of changes on running infrastructure, which are often the root causes of downtime.
  • D. AWS CodeDeploy with a blue/green deployment pattern primarily addresses application deployment downtime, but it doesn't directly prevent underlying infrastructure issues if the CloudFormation template itself is flawed.

Concept tested. CloudFormation change management, CI/CD testing, deployment risk

Reference. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets.html

Community Discussion

No community discussion yet for this question.

Full SAP-C02 PracticeBrowse All SAP-C02 Questions