Reserve capacity in specific Availability Zones with Capacity Reservations
Amazon EC2 On-Demand Capacity Reservations help you reserve compute capacity in specific Availability Zones. To start using Capacity Reservations, you create a Capacity Reservation in a specific Availability Zone. Then, you can launch instances into the reserved capacity, view its capacity utilization in real time, and increase or decrease its capacity as needed.
Capacity Reservations are configured as either open
or
targeted
. If the Capacity Reservation is open
, all new and
existing instances that have matching attributes automatically run in the capacity of
the Capacity Reservation. If the Capacity Reservation is targeted
,
instances must specifically target it to run in the reserved capacity.
Capacity Reservation preference
Capacity Reservation preference helps you use Capacity Reservations efficiently by prioritizing reserved capacity in a Capacity Reservation before using On-Demand capacity. You can select from the following Capacity Reservation preference options:
-
Default – Auto Scaling uses the Capacity Reservation preference from your launch template or an open Capacity Reservation.
-
None – Auto Scaling will not launch instances into a Capacity Reservation. Instances will run in On-Demand capacity.
-
Capacity Reservations only – Auto Scaling will only launch instances into a Capacity Reservation or Capacity Reservation group. If capacity isn't available, instances will fail to launch.
-
Capacity Reservations first – Auto Scaling will launch instances into a Capacity Reservation or Capacity Reservation group. If capacity isn't available instances will run in On-Demand capacity.
If you select Capacity Reservations only or Capacity Reservations first, you can specify a Capacity Reservation target.
Note
You must select a Capacity Reservation preference. Capacity Reservation target is optional.
Considerations for Capacity Reservation preference and launch templates
Consider the following if you select Capacity Reservations only or Capacity Reservations first:
-
If you select Capacity Reservations only or Capacity Reservations first, Auto Scaling will use the Capacity Reservation target specified in the Auto Scaling group instead of the Capacity Reservation target in the launch template.
-
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.
Capacity Reservation target specification
If you select Capacity Reservations only or Capacity Reservations first, the following Capacity Reservation target options are available:
-
Open – Auto Scaling will launch instances into any open Capacity Reservation. If you selected Capacity Reservations only and capacity isn't available, instances will fail to launch. If you selected Capacity Reservations first and capacity isn't available, instances will launch in On-Demand capacity.
-
Specify Capacity Reservation – Auto Scaling will launch instances into the specified Capacity Reservation. If you selected Capacity Reservations only and capacity isn't available, instances will fail to launch. If you selected Capacity Reservations first and capacity isn't available, instances will launch in On-Demand capacity.
-
Specify Capacity Reservation resource group – Auto Scaling will launch instances into an open Capacity Reservation in the specified Capacity Reservation resource group. If you selected Capacity Reservations only and capacity isn't available, instances will fail to launch. If you selected Capacity Reservations first and capacity isn't available, instances will launch in On-Demand capacity.