Work with shared Capacity Reservations
Capacity Reservation sharing enables Capacity Reservation owners to share their reserved capacity with other Amazon accounts or within an Amazon organization. This enables you to create and manage Capacity Reservations centrally, and share the reserved capacity across multiple Amazon accounts or within your Amazon organization.
In this model, the Amazon account that owns the Capacity Reservation (owner) shares it with other Amazon accounts (consumers). Consumers can launch instances into Capacity Reservations that are shared with them in the same way that they launch instances into Capacity Reservations that they own in their own account. The Capacity Reservation owner is responsible for managing the Capacity Reservation and the instances that they launch into it. Owners cannot modify instances that consumers launch into Capacity Reservations that they have shared. Consumers are responsible for managing the instances that they launch into Capacity Reservations shared with them. Consumers cannot view or modify instances owned by other consumers or by the Capacity Reservation owner.
A Capacity Reservation owner can share a Capacity Reservation with:
-
Specific Amazon accounts inside or outside of its Amazon organization
-
An organizational unit inside its Amazon organization
-
Its entire Amazon organization
Contents
- Prerequisites for sharing Capacity Reservations
- Related services
- Share across Availability Zones
- Share a Capacity Reservation
- Stop sharing a Capacity Reservation
- Identify and view a shared Capacity Reservation
- View shared Capacity Reservation usage
- Shared Capacity Reservation permissions
- Billing and metering
- Instance limits
Prerequisites for sharing Capacity Reservations
-
To share a Capacity Reservation, you must own it in your Amazon account. You cannot share a Capacity Reservation that has been shared with you.
-
You can only share Capacity Reservations for shared tenancy instances. You cannot share Capacity Reservations for dedicated tenancy instances.
-
Capacity Reservation sharing is not available to new Amazon accounts or Amazon accounts that have a limited billing history.
To share a Capacity Reservation with your Amazon organization or an organizational unit in your Amazon organization, you must enable sharing with Amazon Organizations. For more information, see Enable Sharing with Amazon Organizations in the Amazon RAM User Guide.
Related services
Capacity Reservation sharing integrates with Amazon Resource Access Manager (Amazon RAM). Amazon RAM is a service that enables you to share your Amazon resources with any Amazon account or through Amazon Organizations. With Amazon RAM, you share resources that you own by creating a resource share. A resource share specifies the resources to share, and the consumers with whom to share them. Consumers can be individual Amazon accounts, or organizational units or an entire organization from Amazon Organizations.
For more information about Amazon RAM, see the Amazon RAM User Guide.
Share across Availability Zones
To ensure that resources are distributed across the Availability Zones for a Region, we independently
map Availability Zones to names for each account. This could lead to Availability Zone naming differences
across accounts. For example, the Availability Zone us-east-1a
for your Amazon account might
not have the same location as us-east-1a
for another Amazon account.
To identify the location of your Capacity Reservations relative to your accounts, you must use the
Availability Zone ID (AZ ID). The AZ ID is a unique and
consistent identifier for an Availability Zone across all Amazon accounts. For
example, use1-az1
is an AZ ID for the us-east-1
Region and
it is the same location in every Amazon account.
To view the AZ IDs for the Availability Zones in your account
Open the Amazon RAM console at https://console.amazonaws.cn/ram
. -
The AZ IDs for the current Region are displayed in the Your AZ ID panel on the right-hand side of the screen.
Share a Capacity Reservation
When you share a Capacity Reservation that you own with other Amazon accounts, you enable them to launch instances into your reserved capacity. If you share an open Capacity Reservation, keep the following in mind as it could lead to unintended Capacity Reservation usage:
-
If consumers have running instances that match the attributes of the Capacity Reservation, have the
CapacityReservationPreference
parameter set toopen
, and are not yet running in reserved capacity, they automatically use the shared Capacity Reservation. -
If consumers launch instances that have matching attributes (instance type, platform, and Availability Zone) and have the
CapacityReservationPreference
parameter set toopen
, they automatically launch into the shared Capacity Reservation.
To share a Capacity Reservation, you must add it to a resource share. A resource share is an Amazon RAM
resource that lets you share your resources across Amazon accounts. A resource share
specifies the resources to share, and the consumers with whom they are shared. When
you share a Capacity Reservation using the Amazon EC2 console, you add it to an existing resource share.
To add the Capacity Reservation to a new resource share, you must create the resource share using
the Amazon RAM console
If you are part of an organization in Amazon Organizations and sharing within your organization is enabled, consumers in your organization are granted access to the shared Capacity Reservation if the prequisites for sharing are met. If the Capacity Reservation is shared with external accounts, they receive an invitation to join the resource share and are granted access to the shared Capacity Reservation after accepting the invitation.
Before launching instances into a Capacity Reservation that is shared with you, verify that you have access to the shared Capacity Reservation by viewing it in the console or by describing it using the describe-capacity-reservations Amazon CLI command. If you can view the shared Capacity Reservation in the console or describe it using the Amazon CLI, it is available for your use and you can launch instances into it. If you attempt to launch instances into the Capacity Reservation and it is not accessible due to a sharing failure, the instances will launch into On-Demand capacity.
You can share a Capacity Reservation that you own using the Amazon EC2 console, Amazon RAM console, or the Amazon CLI.
To share a Capacity Reservation that you own using the Amazon EC2 console
-
Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/
. -
In the navigation pane, choose Capacity Reservations.
-
Choose the Capacity Reservation to share and choose Actions, Share reservation.
-
Select the resource share to which to add the Capacity Reservation and choose Share Capacity Reservation.
It could take a few minutes for consumers to get access to the shared Capacity Reservation.
To share a Capacity Reservation that you own using the Amazon RAM console
See Creating a Resource Share in the Amazon RAM User Guide.
To share a Capacity Reservation that you own using the Amazon CLI
Use the create-resource-share command.
Stop sharing a Capacity Reservation
The Capacity Reservation owner can stop sharing a Capacity Reservation at any time. The following rules apply:
-
Instances owned by consumers that were running in the shared capacity at the time sharing stops continue to run normally outside of the reserved capacity, and the capacity is restored to the Capacity Reservation subject to Amazon EC2 capacity availability.
-
Consumers with whom the Capacity Reservation was shared can no longer launch new instances into the reserved capacity.
To stop sharing a Capacity Reservation that you own, you must remove it from the resource share. You can do this using the Amazon EC2 console, Amazon RAM console, or the Amazon CLI.
To stop sharing a Capacity Reservation that you own using the Amazon EC2 console
-
Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/
. -
In the navigation pane, choose Capacity Reservations.
-
Select the Capacity Reservation and choose the Sharing tab.
-
The Sharing tab lists the resource shares to which the Capacity Reservation has been added. Select the resource share from which to remove the Capacity Reservation and choose Remove from resource share.
To stop sharing a Capacity Reservation that you own using the Amazon RAM console
See Updating a Resource Share in the Amazon RAM User Guide.
To stop sharing a Capacity Reservation that you own using the Amazon CLI
Use the disassociate-resource-share command.
Identify and view a shared Capacity Reservation
Before launching instances into a Capacity Reservation that is shared with you, verify that you have access to the shared Capacity Reservation by viewing it in the console or by describing it using the Amazon CLI. If you can view the shared Capacity Reservation in the console or describe it using the Amazon CLI, it is available for your use and you can launch instances into it. If you attempt to launch instances into the Capacity Reservation and it is not accessible due to a sharing failure, the instance will launch into On-Demand capacity.
Owners and consumers can identify and view shared Capacity Reservations using the Amazon EC2 console and Amazon CLI.
To identify a shared Capacity Reservation using the Amazon EC2 console
-
Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/
. -
In the navigation pane, choose Capacity Reservations. The screen lists Capacity Reservations that you own and Capacity Reservations that are shared with you. The Owner column shows the Amazon account ID of the Capacity Reservation owner.
(me)
next to the Amazon account ID indicates that you are the owner.
To identify a shared Capacity Reservation using the Amazon CLI
Use the describe-capacity-reservations command. The command returns the
Capacity Reservations that you own and Capacity Reservations that are shared with you. OwnerId
shows the Amazon account ID of the Capacity Reservation owner.
View shared Capacity Reservation usage
The owner of a shared Capacity Reservation can view its usage at any time using the Amazon EC2 console and the Amazon CLI.
To view Capacity Reservation usage using the Amazon EC2 console
-
Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/
. -
In the navigation pane, choose Capacity Reservations.
-
Select the Capacity Reservation for which to view the usage and choose the Usage tab.
The Amazon account ID column shows the account IDs of the consumers currently using the Capacity Reservation. The Launched instances column shows the number of instances each consumer currently has running in the reserved capacity.
To view Capacity Reservation usage using the Amazon CLI
Use the get-capacity-reservation-usage command. AccountId
shows the account ID of the account using the Capacity Reservation.
UsedInstanceCount
shows the number of instances the consumer
currently has running in the reserved capacity.
Shared Capacity Reservation permissions
Permissions for owners
Owners are responsible for managing and canceling their shared Capacity Reservations. Owners cannot modify instances running in the shared Capacity Reservation that are owned by other accounts. Owners remain responsible for managing instances that they launch into the shared Capacity Reservation.
Permissions for consumers
Consumers are responsible for managing their instances that are running the shared Capacity Reservation. Consumers cannot modify the shared Capacity Reservation in any way, and they cannot view or modify instances that are owned by other consumers or the Capacity Reservation owner.
Billing and metering
There are no additional charges for sharing Capacity Reservations.
The Capacity Reservation owner is billed for instances that they run inside the Capacity Reservation and for unused reserved capacity. Consumers are billed for the instances that they run inside the shared Capacity Reservation.
If the Capacity Reservation owner belongs to a different payer account and the Capacity Reservation is covered by a Regional Reserved Instance or a Savings Plan, the Capacity Reservation owner continues to be billed for the Regional Reserved Instance or Savings Plan. In these cases, the Capacity Reservation owner pays for the Regional Reserved Instance or Savings Plan, and consumers are billed for the instances that the run in the shared Capacity Reservation.
Instance limits
All Capacity Reservation usage counts toward the Capacity Reservation owner's On-Demand Instance limits. This includes:
-
Unused reserved capacity
-
Usage by instances owned by the Capacity Reservation owner
-
Usage by instances owned by consumers
Instances launched into the shared capacity by consumers count towards the Capacity Reservation owner's On-Demand Instance limit. Consumers' instance limits are a sum of their own On-Demand Instance limits and the capacity available in the shared Capacity Reservations to which they have access.