AWS Certified SysOps Administrator – Associate (legacy) — Question 149
An application running on Amazon EC2 instances in an Auto Scaling group across multiple Availability Zones was deployed using an AWS CloudFormation template. The SysOps team has patched the Amazon Machine Image (AMI) version and must update all the EC2 instances to use the new AMI.
How can the SysOps Administrator use CloudFormation to apply the new AMI while maintaining a minimum level of active instances to ensure service continuity?
Answer options
- A. Run the aws cloudfomation update-stack command with the ג€" rollback-configuration option
- B. Update the CloudFormation template with the new AMI ID, then reboot the EC2 instances
- C. Deploy a second CloudFormation stack and use Amazon Route 53 to redirect traffic to the new stack
- D. Set an AutoScalingRollingUpdate policy in the CloudFormation template to update the stack.
Correct answer: D
Explanation
The correct answer is D because setting an AutoScalingRollingUpdate policy allows for the gradual replacement of instances with the new AMI while maintaining service availability. Option A is incorrect because the rollback configuration does not facilitate a smooth update; Option B fails as rebooting does not apply the new AMI; and Option C is not efficient as it requires managing two stacks instead of updating the existing one.