AWS Certified Solutions Architect – Professional — Question 694

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

Associating the CodeDeploy deployment group directly with the Auto Scaling group allows CodeDeploy to automatically deploy application revisions to any newly launched instances during scale-out events. Pre-installing the CodeDeploy agent on a custom AMI ensures the agent is immediately active without needing bootstrap scripts. Other options involving Lambda triggers, custom scripting, or rebuilding AMIs for every code deployment introduce significant operational overhead and complexity.