You can modify the total target capacity and date of a Capacity Reservation Fleet at any time. When you modify the total target capacity of a Capacity Reservation Fleet, the Fleet automatically creates new Capacity Reservations, or modifies or cancels existing Capacity Reservations in the Fleet to meet the new total target capacity. When you modify the end date for the Fleet, the end dates for all of the individual Capacity Reservations are updated accordingly.
After you modify a Fleet, its status transitions to modifying
. You
can't attempt additional modifications to a Fleet while it is in the
modifying
state.
You can't modify the tenancy, Availability Zone, instance types, instance platforms, priorities, or weights used by a Capacity Reservation Fleet. If you need to change any of these parameters, you might need to cancel the existing Fleet and create a new one with the required parameters.
To modify a Capacity Reservation Fleet
Use the modify-capacity-reservation-fleet
Note
You can't specify --end-date
and --remove-end-date
in the same command.
aws ec2 modify-capacity-reservation-fleet \ --capacity-reservation-fleet-id
cr_fleet_ids
\ --total-target-capacitycapacity_units
\ --end-dateyyyy-mm-ddThh:mm:ss.000Z
\ --remove-end-date
The following is example output.
{
"Return": true
}
Example: Modify total target capacity
aws ec2 modify-capacity-reservation-fleet \ --capacity-reservation-fleet-id crf-01234567890abcedf \ --total-target-capacity 160
Example: Modify end date
aws ec2 modify-capacity-reservation-fleet \ --capacity-reservation-fleet-id crf-01234567890abcedf \ --end-date 2021-07-04T23:59:59.000Z
Example: Remove end date
aws ec2 modify-capacity-reservation-fleet \ --capacity-reservation-fleet-id crf-01234567890abcedf \ --remove-end-date
The following is example output.
{
"Return": true
}