AWS Certified Solutions Architect – Professional (SAP-C02) — Question 379

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?

Answer options

Correct answer: B

Explanation

Option B is correct because it implements a fully automated CI/CD pipeline using AWS CodeBuild for automated testing and CloudFormation change sets to preview infrastructure modifications. Additionally, migrating from user data scripts to AWS CodeDeploy blue/green deployments allows for safe traffic shifting and rapid rollbacks if errors occur. Options A, C, and D are less desirable as they rely heavily on manual testing, custom scripting, or manual server logins, which do not align with AWS best practices for automation and high availability.