Use Capacity Reservation preference with your Auto Scaling group - Amazon EC2 Auto Scaling
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Use Capacity Reservation preference with your Auto Scaling group

To use Capacity Reservations with your Auto Scaling group, you must first create a Capacity Reservation or a Capacity Reservation resource group. Then, you can add a Capacity Reservation preference to your Auto Scaling group when you create it or when you update an existing group.

To create a Capacity Reservation, see Create a Capacity Reservation in the Amazon EC2 User Guide. To create a Capacity Reservation group, see Create a Capacity Reservation group in the Amazon EC2 User Guide.

Use one of the following methods to use Capacity Reservation preference when you are creating or editing a Auto Scaling group.

Console
To use Capacity Reservation preference on a new group (console)
  1. Follow the instructions in Create an Auto Scaling group using the Amazon EC2 launch wizard and complete each step in the procedure, up to step 3.

  2. On the Configure group size and scaling page, under Additional capacity settings, Capacity Reservation preference, select a Capacity Reservation preference. For more information about Capacity Reservation preference, see Capacity Reservation preference.

  3. Continue with the steps in Create an Auto Scaling group using the Amazon EC2 launch wizard.

Amazon CLI
To use Capacity Reservation preference on a new group (Amazon CLI)

Add the --capacity-reservation-specification parameter to the create-auto-scaling-group command.

  1. Specify a Capacity Reservation preference. For more information, see Capacity Reservation preference.

  2. Specify a Capacity Reservation target. If you select Capacity Reservations only or Capacity Reservations first and you don't specify a Capacity Reservation target, Auto Scaling will use the launch template Capacity Reservation target or an open Capacity Reservation.

Console
To use Capacity Reservation preference on an existing group (console)
  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/, and choose Auto Scaling Groups from the navigation pane.

  2. On the navigation bar at the top of the screen, choose the Amazon Web Services Region that you created your Auto Scaling group in.

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

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

  4. On the Details tab, under Capacity Reservation preference, choose Edit.

  5. Under Additional capacity settings, Capacity Reservation preference, select a Capacity Reservation preference. For more information about Capacity Reservation preference, see Capacity Reservation preference.

  6. Choose Update.

Amazon CLI
To use Capacity Reservation preference on an existing group (Amazon CLI)

Add the --capacity-reservation-specification parameter to the update-auto-scaling-group command.

  1. Specify a Capacity Reservation preference. For more information, see Capacity Reservation preference.

  2. Specify a Capacity Reservation target. If you select Capacity Reservations only or Capacity Reservations first and you don't specify a Capacity Reservation target, Auto Scaling will use the launch template Capacity Reservation target or an open Capacity Reservation.