Question

Difficulty: MediumAuto Scaling and Elasticity

A SysOps administrator needs to update the Amazon Machine Image (AMI) for all Amazon EC2 instances in an Auto Scaling group (ASG) with minimal downtime. The administrator decides to use the ASG Instance Refresh feature.

Arrange the steps in the correct chronological order to successfully execute this rolling update.

  1. 1Update the Auto Scaling group configuration to reference the new launch template version containing the updated AMI.
  2. 2Start the instance refresh process on the Auto Scaling group with a specified minimum healthy percentage (e.g., 50%50\%).
  3. 3Terminate a batch of instances running the old launch template version to respect the minimum healthy percentage.
  4. 4Launch replacement instances using the new launch template version and wait for them to pass health checks.
  5. 5Repeat the termination and replacement process for the remaining instances running the old launch template version.
  6. 6Transition the instance refresh status to Successful once all instances run the new launch template version.

Answer

The correct order of operations is: First, update the Auto Scaling group configuration to reference the new launch template version. Second, start the instance refresh process. Third, terminate a batch of instances running the old version while keeping the active count above the minimum healthy percentage. Fourth, launch replacement instances using the new version and verify their health. Fifth, repeat the process for the remaining old instances. Finally, transition the refresh status to Successful.
The correct order of steps ensures that the Auto Scaling group is updated with the new configuration first, so that the subsequent instance refresh knows the target state. The refresh then terminates and replaces instances in batches to maintain application availability, verifying the health of each batch before proceeding, and finally completing the process.

Step-by-Step Solution

1
Update the Auto Scaling group configuration to point to the new launch template version.
The target configuration for the group is set to the new template containing the updated AMI.
The instance refresh uses the group's currently associated launch template version to determine which instances need to be replaced.
2
Start the instance refresh process.
The rolling replacement workflow is initialized on the Auto Scaling group.
Starting the refresh tells Auto Scaling to begin the rolling update to match the newly associated launch template version.
3
Terminate a subset of instances running the old launch template version.
A batch of old instances is terminated while maintaining the minimum healthy percentage.
This ensures that the application retains enough active capacity to handle traffic during the update.
4
Launch replacement instances using the new launch template version and verify their health.
New instances are brought online and registered as healthy.
The rolling update cannot proceed to the next batch until the current replacement batch is verified healthy.
5
Repeat the termination and replacement steps for the remaining old instances.
The remaining old instances are replaced in subsequent batches.
This completes the rolling update across the entire Auto Scaling group.
6
Verify all instances are running the new launch template version and transition status.
The instance refresh status becomes Successful.
This marks the successful completion of the rolling update.

Key Concept

Auto Scaling Group Instance Refresh
Rate this question