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

A company has an application that runs on Amazon EC2 instances in an Amazon EC2 Auto Scaling group. The company uses AWS CodePipeline to deploy the application. The instances that run in the Auto Scaling group are constantly changing because of scaling events.

When the company deploys new application code versions, the company installs the AWS CodeDeploy agent on any new target EC2 instances and associates the instances with the CodeDeploy deployment group. The application is set to go live within the next 24 hours.

What should a solutions architect recommend to automate the application deployment process with the LEAST amount of operational overhead?

Answer options

Correct answer: D

Explanation

The correct answer is D because creating a new AMI with the CodeDeploy agent pre-installed simplifies the deployment process for new instances in the Auto Scaling group, allowing them to automatically be associated with the deployment group. Options A and C involve additional steps like using Lambda or CodeBuild, which introduce more complexity and potential points of failure. Option B requires manual intervention to pause and resume scaling operations, which increases operational overhead.