Which solution should a SysOps administrator use to meet the deployment requirements for this new release?
Configure the Auto Scaling group to use lifecycle hooks. Deploy new instances with the new application version. Complete the lifecycle hook action once healthy.
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.
Deploy a second CloudFormation stack. Wait for the application to be available. Cut over to the new Application Load Balancer.
Modify the CloudFormation template to use an AutoScalingReplacingUpdate policy. Update the stack. Perform a second update with the new release.
Explanations:
Lifecycle hooks allow the Auto Scaling group to pause instance termination or launch, but this does not fully address the deployment requirements. The rollback and DNS stability would still need manual intervention or a different approach.
Updating the Auto Scaling group with a new launch configuration containing the new AMI will cause instances to be replaced. This can cause issues with application availability, and DNS stability might be impacted due to the lack of controlled deployment and rollback capabilities.
Deploying a second CloudFormation stack with a cutover to the new Application Load Balancer can introduce DNS changes and complicates rollback, which does not meet the requirement of avoiding DNS changes and allowing rollback.
The AutoScalingReplacingUpdate policy provides a controlled rolling update of instances within an Auto Scaling group, avoiding DNS changes and allowing easy rollback by updating the stack to revert to the previous configuration if needed.