Update an Auto Scaling group - Amazon EC2 Auto Scaling

Update an Auto Scaling group

You can update most of your Auto Scaling group's details. You can't update the name of an Auto Scaling group or change its AWS Region.

To update an Auto Scaling group (console)
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/, and choose Auto Scaling Groups from the navigation pane.

  2. Choose your Auto Scaling group to display information about the group, with tabs for Details, Activity, Automatic scaling, Instance management, Monitoring, and Instance refresh.

  3. Choose the tabs for the configuration areas that you're interested in and update the settings as needed. For each setting that you edit, choose Update to save your changes to the Auto Scaling group's configuration.

To update an Auto Scaling group using the command line

You can use one of the following commands:

Update Auto Scaling instances

If you associate a new launch template or launch configuration with an Auto Scaling group, all new instances will get the updated configuration. Existing instances continue to run with the configuration that they were originally launched with. To apply your changes to existing instances, you have the following options:

Note

You can change the following instance attributes by specifying them as part of the launch template or launch configuration:

  • Amazon Machine Image (AMI)

  • block devices

  • key pair

  • instance type

  • security groups

  • user data

  • monitoring

  • IAM instance profile

  • placement tenancy

  • kernel

  • ramdisk

  • whether the instance has a public IP address

  • the Availability Zone distribution strategy

Auto Scaling group allocation strategy and capacity changes

When you change an Auto Scaling group allocation strategy, existing instances are not replaced. Any new instances that are launched because of scale out events will follow the new allocation strategy. Any future scale in events will follow the termination policy and use the new allocation strategy if the termination policy is set to Default or AllocationStrategy. For example, if you change the allocation strategy from lowest-price to price-capacity-optimized, there might not be any instance terminations, but any new instances will be launched with the new allocation strategy. Instance type changes do not affect existing instances.

When you change certain parameters such as the OnDemandBaseCapacity or the OnDemandPercentageAboveBaseCapacity, Auto Scaling will automatically rebalance if the percentage of On-Demand Instances and Spot Instances do not match the new specifications. For example, suppose an Auto Scaling group has the OnDemandPercentageAboveBaseCapacity set to 50 percent On-Demand Instances and 50 percent Spot Instances. Then, the OnDemandPercentageAboveBaseCapacity is increased to 100 percent On-Demand Instances. The Auto Scaling group will proactively rebalance by launching new On-Demand Instances and terminating Spot Instances. The instance maintenance policy that you defined determines the order of the launch and termination activities.