Changing the Launch Configuration for an Auto Scaling Group - Amazon EC2 Auto Scaling

Changing the Launch Configuration for an Auto Scaling Group

An Auto Scaling group is associated with one launch configuration at a time, and you can't modify a launch configuration after you've created it. To change the launch configuration for an Auto Scaling group, use an existing launch configuration as the basis for a new launch configuration. Then, update the Auto Scaling group to use the new launch configuration.

After you change the launch configuration for an Auto Scaling group, any new instances are launched using the new configuration options, but existing instances are not affected. To update the existing instances, terminate them so that they are replaced by your Auto Scaling group, or allow automatic scaling to gradually replace older instances with newer instances based on your termination policies.

Note

With the maximum instance lifetime and instance refresh features, you can also replace all instances in the Auto Scaling group to launch new instances that use the new launch configuration. For more information, see Replacing Auto Scaling Instances Based on Maximum Instance Lifetime and Replacing Auto Scaling Instances Based on an Instance Refresh.

To change the launch configuration for an Auto Scaling group (new console)

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. On the navigation pane, under AUTO SCALING, choose Launch Configurations.

  3. Select the launch configuration and choose Actions, Copy launch configuration. This sets up a new launch configuration with the same options as the original, but with "Copy" added to the name.

  4. On the Copy Launch Configuration page, edit the configuration options as needed and choose Create launch configuration.

  5. On the navigation pane, under AUTO SCALING, choose Auto Scaling Groups.

  6. Select the check box next to the Auto Scaling group.

    A split pane opens up in the bottom part of the page, showing information about the group that's selected.

  7. On the Details tab, choose Launch configuration, Edit.

  8. For Launch configuration, select the new launch configuration.

  9. When you have finished, choose Update.

To change the launch configuration for an Auto Scaling group (old console)

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. On the navigation pane, under AUTO SCALING, choose Launch Configurations.

  3. Select the launch configuration and choose Actions, Copy launch configuration. This sets up a new launch configuration with the same options as the original, but with "Copy" added to the name.

  4. On the Copy Launch Configuration page, edit the configuration options as needed and choose Create launch configuration.

  5. On the confirmation page, choose View your Auto Scaling groups.

  6. Select the check box next to the Auto Scaling group.

    A split pane opens up in the bottom part of the page, showing information about the group that's selected.

  7. Choose Details, Edit.

  8. Select the new launch configuration from Launch Configuration and choose Save.

To change the launch configuration for an Auto Scaling group (AWS CLI)

  1. Describe the current launch configuration using the describe-launch-configurations command.

  2. Create a new launch configuration using the create-launch-configuration command.

  3. Update the launch configuration for the Auto Scaling group using the update-auto-scaling-group command with the --launch-configuration-names parameter.

To change the launch configuration for an Auto Scaling group (Tools for Windows PowerShell)

  1. Describe the current launch configuration using the Get-ASLaunchConfiguration command.

  2. Create a new launch configuration using the New-ASLaunchConfiguration command.

  3. Update the launch configuration for the Auto Scaling group using the Update-ASAutoScalingGroup command with the -LaunchConfigurationName parameter.