nerdexam
Amazon

SAP-C02 · Question #609

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…

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

How the community answered

(34 responses)
  • A
    15% (5)
  • B
    59% (20)
  • C
    6% (2)
  • D
    21% (7)

Why each option

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.

AAdapt the deployment scripts to detect and report CloudFormation error conditions when

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.

BImplement automated testing using AWS CodeBuild in a test environment. Use CloudFormationCorrect

Implementing automated testing with AWS CodeBuild in a test environment allows for early detection of issues within CloudFormation templates or application changes before they reach production. Using CloudFormation change sets provides a preview of the proposed infrastructure modifications, enabling review and identification of potential downtime-causing changes.

CUse plugins for the integrated development environment (IDE) to check the templates for errors,

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.

DUse AWS CodeDeploy and a blue/green deployment pattern with CloudFormation to replace the

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

Source: 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 Practice