AWS Certified SysOps Administrator – Associate (legacy) — Question 676
A company's application infrastructure was deployed using AWS CloudFormation and is composed of Amazon EC2 instances behind an Application Load
Balancer. The instances run in an EC2 Auto Scaling group across multiple Availability Zones. When releasing a new version of the application, the update deployment must avoid DNS changes and allow rollback.
Which solution should a SysOps administrator use to meet the deployment requirements for this new release?
Answer options
- A. Configure the Auto Scaling group to use lifecycle hooks. Deploy new instances with the new application version. Complete the lifecycle hook action once healthy.
- B. Create a new Amazon Machine Image (AMI) containing the updated code. Create a launch configuration with the AMI. Update the Auto Scaling group to use the new launch configuration.
- C. Deploy a second CloudFormation stack. Wait for the application to be available. Cut over to the new Application Load Balancer.
- D. Modify the CloudFormation template to use an AutoScalingReplacingUpdate policy. Update the stack. Perform a second update with the new release.
Correct answer: A
Explanation
Using EC2 Auto Scaling lifecycle hooks allows the SysOps administrator to pause instance state transitions during deployment to perform validation and software installation. This ensures that new instances are fully functional before receiving traffic through the existing Application Load Balancer, thereby avoiding DNS changes and allowing an easy rollback if the health checks fail. Other options, such as deploying a new stack (Option C), would require DNS modifications to cut over to the new load balancer.