Change the launch configuration for an Auto Scaling group - Amazon EC2 Auto Scaling

Change the launch configuration for an Auto Scaling group

Important

We provide information about launch configurations for customers who have not yet migrated from launch configurations to launch templates. For information about migrating your Auto Scaling groups to launch templates, see Migrate to launch templates.

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 auto scaling to gradually replace older instances with newer instances based on your termination policies.

Note

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 Replace Auto Scaling instances.

To change the launch configuration for an Auto Scaling group (console)
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. On the top navigation bar, select your AWS Region.

  3. On the left navigation pane, under Auto Scaling, choose Auto Scaling Groups.

  4. Choose Launch configurations near the top of the page. When prompted for confirmation, choose View launch configurations to confirm that you want to view the Launch configurations page.

  5. 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.

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

  7. On the left navigation pane, under Auto Scaling, choose Auto Scaling Groups.

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

    A split pane opens up in the bottom of the page.

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

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

  11. When you have finished, choose Update.

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.