AWS Certified Sysops Administrator Associate · Free Practice Question Medium

Question 51

A SysOps Administrator deployed an application using AWS CloudFormation. The application runs on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB). A new version of the application must be deployed. The update must avoid DNS changes and support rollback.

Which solution should the Administrator use to meet the deployment requirements for application update?

  • A

    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.

  • B

    Modify the CloudFormation template to use an AutoScalingReplacingUpdate policy. Update the stack. Perform a second update with the new release.

  • C

    Deploy a second CloudFormation stack. Wait for the application to be available. Cut over to the new Application Load Balancer.

  • D

    Configure the Auto Scaling group to use lifecycle hooks. Deploy new instances with the new application version. Complete the lifecycle hook action once healthy.

Reveal correct answer

Correct answer: B

Explanation

To specify how AWS CloudFormation handles replacement updates for an Auto Scaling group, use the AutoScalingReplacingUpdate policy. This policy enables you to specify whether AWS CloudFormation replaces an Auto Scaling group with a new one or replaces only the instances in the Auto Scaling group.

CORRECT: "Modify the CloudFormation template to use an AutoScalingReplacingUpdate policy. Update the stack. Perform a second update with the new release" is the correct answer.

INCORRECT: "Configure the Auto Scaling group to use lifecycle hooks. Deploy new instances with the new application version. Complete the lifecycle hook action once healthy" is incorrect. You should use AWS CloudFormation to update the stack rather than updating the resources directly.

INCORRECT: "Deploy a second CloudFormation stack. Wait for the application to be available. Cut over to the new Application Load Balancer" is incorrect. This method would require a DNS update. It hasn’t been mentioned in the question but presumably there would be an Amazon Route 53 Alias record or similar pointing to the existing ALB. This would need to be updated to point to the new ALB.

INCORRECT: "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" is incorrect. This method means you would cause issues with stack drift as you are updating the resources directly rather than through CloudFormation.

References:

https://aws.amazon.com/premiumsupport/knowledge-center/auto-scaling-group-rolling-updates/

Save time with our AWS cheat sheets:

https://digitalcloud.training/aws-cloudformation/

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need