Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Create a Capacity Reservation Fleet

Focus mode
Create a Capacity Reservation Fleet - Amazon Elastic Compute Cloud

When you create a Capacity Reservation Fleet it automatically creates Capacity Reservations for the instance types specified in the Fleet request, up to the specified total target capacity. The number of instances for which the Capacity Reservation Fleet reserves capacity depends on the total target capacity and instance type weights that you specify in the request. For more information, see Instance type weight and Total target capacity.

When you create the Fleet, you must specify the instance types to use and a priority for each of those instance types. For more information, see Allocation strategy and Instance type priority.

Note

The AWSServiceRoleForEC2CapacityReservationFleet service-linked role is automatically created in your account the first time that you create a Capacity Reservation Fleet. For more information, see Using service-linked roles for Capacity Reservation Fleet.

Currently, Capacity Reservation Fleets support the open instance matching criteria only.

To create a Capacity Reservation Fleet

Use the create-capacity-reservation-fleet AWS CLI command.

aws ec2 create-capacity-reservation-fleet \ --total-target-capacity capacity_units \ --allocation-strategy prioritized \ --instance-match-criteria open \ --tenancy dedicated|default \ --end-date yyyy-mm-ddThh:mm:ss.000Z \ --instance-type-specifications file://instanceTypeSpecification.json

The following is the contents of instanceTypeSpecification.json.

[ { "InstanceType": "instance_type", "InstancePlatform":"platform", "Weight": instance_type_weight, "AvailabilityZone":"availability_zone", "AvailabilityZoneId" : "az_id", "EbsOptimized": true|false, "Priority" : instance_type_priority } ]

Expected output.

{ "Status": "status", "TotalFulfilledCapacity": fulfilled_capacity, "CapacityReservationFleetId": "cr_fleet_id", "TotalTargetCapacity": capacity_units }

Example

aws ec2 create-capacity-reservation-fleet \ --total-target-capacity 24 \ --allocation-strategy prioritized \ --instance-match-criteria open \ --tenancy default \ --end-date 2021-12-31T23:59:59.000Z \ --instance-type-specifications file://instanceTypeSpecification.json

instanceTypeSpecification.json

[ { "InstanceType": "m5.xlarge", "InstancePlatform": "Linux/UNIX", "Weight": 3.0, "AvailabilityZone":"us-east-1a", "EbsOptimized": true, "Priority" : 1 } ]

Example output.

{ "Status": "submitted", "TotalFulfilledCapacity": 0.0, "CapacityReservationFleetId": "crf-abcdef01234567890", "TotalTargetCapacity": 24 }
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.