An application runs on EC2 instances in an Auto Scaling group and deployment uses AWS CodePipeline. Instances scale frequently, and during deployments the company installs the CodeDeploy agent on new instances and associates them with the CodeDeploy deployment group manually. The application must go live within 24 hours. What should a solutions architect recommend to automate deployments with the LEAST operational overhead?
Choose an answer
Tap an option to check your answer.
Correct answer: Bake a new AMI that includes the CodeDeploy agent. Update the Auto Scaling group's launch template to use that AMI. Associate the CodeDeploy deployment group with the Auto Scaling group (not individual instances)..
Why this is the answer
The correct answer automates the process with the least operational overhead by baking the CodeDeploy agent directly into the AMI. This ensures all new instances launched by the Auto Scaling group automatically have the agent installed. Associating the CodeDeploy deployment group with the Auto Scaling group itself, rather than individual instances, means CodeDeploy automatically manages instances as they scale in and out, eliminating manual registration. Using EventBridge and Lambda to register instances is more complex and adds custom code to maintain. Suspending Auto Scaling, creating AMIs, and updating launch templates manually is a high-overhead, multi-step process that doesn't fully automate the CodeDeploy agent installation or instance registration. While CodeBuild for AMI creation is a valid strategy for application updates, it doesn't directly address the CodeDeploy agent installation and instance registration problem as efficiently as baking the agent into the AMI and associating the deployment group with the Auto Scaling group.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed