Use an instance refresh to update instances in an Amazon EC2 Auto Scaling group
You can use an instance refresh to update the instances in your Amazon EC2 Auto Scaling group. This feature can be useful when a configuration change requires you to replace instances or their root volumes, especially if your Amazon EC2 Auto Scaling group contains a large number of instances.
Some situations where an instance refresh can help include:
-
Deploying a new Amazon Machine Image (AMI) or user data script across your Amazon EC2 Auto Scaling group. You can create a new launch template with the changes and then use an instance refresh to roll out the updates immediately.
-
Migrating your instances to new instance types to take advantage of the latest improvements and optimizations.
-
Switching your Amazon EC2 Auto Scaling groups from using a launch configuration to using a launch template. You can copy your launch configurations to launch templates and then use an instance refresh to update your instances to the new templates. For more information about migrating to launch templates, see Migrate your Amazon EC2 Auto Scaling groups to launch templates.
-
Applying security patches or software updates while preserving long-running instance state and avoiding capacity constraints with specialized instance types like GPU or Mac instances.