

# Billing assignment for shared Amazon EC2 Capacity Reservations
<a name="assign-billing"></a>

By default, when a Capacity Reservation is shared, the owner is billed for the instances they run in the Capacity Reservation and for any available capacity, also called *unused capacity*, in the Capacity Reservation; while consumers are billed only for the instances they run in the shared Capacity Reservation.

If needed, the Capacity Reservation owner can assign the billing of any available capacity in the Capacity Reservation to any one of the accounts with which the Capacity Reservation is shared. After billing is assigned to another account, that account becomes the *billing owner* of any available capacity in the Capacity Reservation. Any charges for available capacity in the Capacity Reservation, from that point onward, are billed to the assigned account instead of the owner's account. The Capacity Reservation owner and the accounts with which the Capacity Reservation is shared continue to be billed for the instances they run in the Capacity Reservation.

**Important**  
 The Capacity Reservation owner remains the resource owner and they remain responsible for managing the Capacity Reservation. The account to which billing is assigned does not get any additional privileges; they can't cancel, modify, or share the Capacity Reservation in any way.

**Topics**
+ [

## How it works
](#how-billing-ownership-works)
+ [

## Considerations
](#billing-ownership-considerations)
+ [Assign billing](request-billing-transfer.md)
+ [View billing assignment requests](view-billing-transfers.md)
+ [Accept or reject billing](accept-decline-billing-transfer.md)
+ [Cancel or revoke requests](cancel-billing-transfer.md)
+ [Monitor requests](billing-ownership-events.md)

## How it works
<a name="how-billing-ownership-works"></a>

Only the Capacity Reservation owner can assign billing of a shared Capacity Reservation to another account. Billing can be assigned only to an account with which the Capacity Reservation is shared and that is consolidated under the same AWS Organizations payer account as the Capacity Reservation owner.

To assign billing of the available capacity of a Capacity Reservation to another account, the Capacity Reservation owner must initiate a request to the required account. The specified account receives the request and they must either accept or reject it within 12 hours.
+ If they **accept**, they become the *billing owner* of any available capacity, also called *unused capacity*, in the Capacity Reservation. From that point onward, charges for any available capacity in the Capacity Reservation are billed to their account instead of the owner's account. After it is accepted, only the Capacity Reservation owner can revoke billing from the assigned account.
+ If they **reject**, the Capacity Reservation owner remains the billing owner of the available capacity in the Capacity Reservation. Charges for any available capacity in the Capacity Reservation continue to be billed to the owner's account.
+ If they **do not accept or reject** the request within 12 hours, it expires and charges for any available capacity in the Capacity Reservation continue to be billed to owner's account.

For the period that billing is assigned to another account, the `Reservation` and `UnusedBox` line items appear in the assigned account's Cost and Usage Report (CUR) instead of the owner's CUR.

The following table shows which line items appear in the CUR for the Capacity Reservation owner and consumer accounts **before** billing is assigned to another account.


| Account | CUR line items before billing is assigned | 
| --- | --- | 
| Capacity Reservation owner |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html)  | 
| Consumer accounts with which the Capacity Reservation is shared |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html)  | 

The following table shows which line items appear in the CUR for the Capacity Reservation owner and consumer accounts **after** billing is assigned to another account.


| Account | CUR line items after billing is assigned | 
| --- | --- | 
| Capacity Reservation owner |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html)  | 
| Consumer account to which billing is assigned |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html)  | 
| Other consumer accounts with which the Capacity Reservation is shared |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html)  | 

**Note**  
\$1 The `BoxUsage` line item appears in an account's CUR only if they have running instances in the Capacity Reservation. For more information about the CUR line items, see [Monitoring Capacity Reservations](https://docs.aws.amazon.com/cur/latest/userguide/monitor-ondemand-reservations.html).
Use the Capacity Reservation ARN in the CUR to determine who owns the Capacity Reservation. If the ARN includes your AWS account ID, you are the Capacity Reservation owner. Otherwise, the Capacity Reservation is owned by a different account but billing is assigned to you.
Cost allocation tags assigned to Capacity Reservation by the owner will not appear in the consumer account's CUR. Cost allocation tags appear in the Capacity Reservation owner's CUR only.

## Considerations
<a name="billing-ownership-considerations"></a>

Keep the following in mind when assigning billing of a shared Capacity Reservation:
+ You can't do partial or split billing assignments. Billing of all available capacity of a Capacity Reservation can be assigned to one account at a time.
+ The available capacity of a Capacity Reservation can change over time. This will impact billing for the assigned account. For example, available capacity can increase if the Capacity Reservation owner increases the size of the Capacity Reservation, or if other consumer accounts stop or terminate their instances running in the Capacity Reservation.
+ Billing can be assigned only to a consumer account that is consolidated under the same AWS Organizations payer account. Billing is automatically revoked from the consumer account if they leave the organization, or if the Capacity Reservation is no longer shared with them.
+ Only the Capacity Reservation owner can cancel a pending billing assignment request and revoke billing from an assigned account after the request has been accepted.

# Assign billing of a shared EC2 Capacity Reservation to another account
<a name="request-billing-transfer"></a>

To assign billing of the available capacity of a shared Capacity Reservation to another account, the Capacity Reservation owner must initiate a request to the required account. In the Amazon EC2 console, this request is called a *transfer request*.

A Capacity Reservation owner can assign billing of the available capacity of Capacity Reservation to an account only if:
+ The Capacity Reservation is already shared with that account.
+ The account is consolidated under the same AWS Organizations payer account as the Capacity Reservation owner.

Billing is assigned to the specified account only once they accept the request.

When a Capacity Reservation owner initiates a request, an Amazon EventBridge event is sent to the requested account. For more information, see [Monitor billing assignment requests for shared Capacity Reservations](billing-ownership-events.md).

------
#### [ Console ]

**To assign billing of a shared Capacity Reservation**

1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/).

1. In the navigation panel, select **Capacity Reservations** and then choose the shared Capacity Reservation.

1. In the **Billing of available capacity** section, choose **Assign billing**.

1. In the **Assign billing** screen, select the consumer account to which to assign billing, and then choose **Request**.

------
#### [ AWS CLI ]

**To assign billing of a shared Capacity Reservation**  
Use the [associate-capacity-reservation-billing-owner](https://docs.aws.amazon.com/cli/latest/reference/ec2/associate-capacity-reservation-billing-owner.html) command. For `--capacity-reservation-id`, specify the ID of the shared Capacity Reservation. For `--unused-reservation-billing-owner-id`, specify the ID of the AWS account to which to assign billing.

```
aws ec2 associate-capacity-reservation-billing-owner \
    --capacity-reservation-id cr-01234567890abcdef \
    --unused-reservation-billing-owner-id 123456789012
```

------
#### [ PowerShell ]

**To assign billing of a shared Capacity Reservation**  
Use the [Register-EC2CapacityReservationBillingOwner](https://docs.aws.amazon.com/powershell/latest/reference/items/Register-EC2CapacityReservationBillingOwner.html) cmdlet. For `-CapacityReservationId`, specify the ID of the shared Capacity Reservation. For `-UnusedReservationBillingOwnerId`, specify the ID of the AWS account to which to assign billing.

```
Register-EC2CapacityReservationBillingOwner `
    -CapacityReservationId cr-01234567890abcdef `
    -UnusedReservationBillingOwnerId 123456789012
```

------

# View billing assignment requests for shared EC2 Capacity Reservations
<a name="view-billing-transfers"></a>

A Capacity Reservation owner can view only the most recent billing assignment request that they initiated. And consumer accounts can view only the most recent billing assignment requests sent to them. 

Requests can be viewed for 24 hours after they enter the `cancelled`, `expired`, or `revoked` state. After 24 hours, they can no longer be viewed.

------
#### [ Console ]

**(Capacity Reservation owner) To view requests you initiated**

1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/).

1. In the navigation panel, select **Capacity Reservations** and then choose the shared Capacity Reservation for which to view requests.

1. The **Billing of available capacity** section shows the most recent request and its current state.

**(Consumer account) To requests sent to you**

1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/).

1. In the navigation panel, select **Capacity Reservations**.

1. If you have pending requests, the **Pending billing assignment requests** banner appears at the top of the screen. If the banner does not appear, you do not have pending requests.

   To view the requests, choose **Review requests** in the banner.

------
#### [ AWS CLI ]

**(Capacity Reservation owner) To view requests you initiated**  
Use the [describe-capacity-reservation-billing-requests](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-capacity-reservation-billing-requests.html) command.

```
aws ec2 describe-capacity-reservation-billing-requests \
    --role odcr-owner
```

**(Consumer account) To view requests sent to you**  
Use the [describe-capacity-reservation-billing-requests](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-capacity-reservation-billing-requests.html) command.

```
aws ec2 describe-capacity-reservation-billing-requests \
    --role unused-reservation-billing-owner
```

------
#### [ PowerShell ]

**(Capacity Reservation owner) To view requests you initiated**  
Use the [Get-EC2CapacityReservationBillingRequest](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2CapacityReservationBillingRequest.html) cmdlet.

```
Get-EC2CapacityReservationBillingRequest `
    -Role odcr-owner
```

**(Consumer account) To view requests sent to you**  
Use the [Get-EC2CapacityReservationBillingRequest](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2CapacityReservationBillingRequest.html) cmdlet.

```
Get-EC2CapacityReservationBillingRequest `
    -Role unused-reservation-billing-owner
```

------

A request can be in one of the following states.


| State | Description | 
| --- | --- | 
| pending | The request has not been accepted or rejected, but it has not yet expired. | 
| accepted | The request was accepted by the specified account. Billing of available capacity of the Capacity Reservation is assigned to the consumer account. | 
| rejected | The request was rejected by the consumer account. | 
| cancelled | The request was cancelled by the Capacity Reservation owner while it was in the pending state. | 
| revoked | Billing was revoked from the consumer account for one of the following reasons: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/view-billing-transfers.html)  | 
| expired | The request expired because the consumer account did not accept or reject it within 12 hours. | 

# Accept or reject billing of a shared EC2 Capacity Reservation
<a name="accept-decline-billing-transfer"></a>

If you receive a billing assignment request for a Capacity Reservation that is shared with you, you can either accept or reject it. The request remains in the `pending` state until it is accepted or rejected.

If you accept the request, it enters the `accepted` state, and billing of any available, or *unused*, capacity of that Capacity Reservation is assigned to your account from that point onward. After you accept a request, only the Capacity Reservation owner can revoke billing from your account.

If you reject the request, it enters the `rejected` state, and billing of the available capacity of the Capacity Reservation remains assigned to the Capacity Reservation owner.

Requests expire if they are not accepted or rejected within 12 hours. If a request expires, billing of any unused capacity of the Capacity Reservation remains assigned to the Capacity Reservation owner.

When a request is accepted or rejected, an Amazon EventBridge event is sent to the Capacity Reservation owner's account. When a request expires, an Amazon EventBridge event is sent to the Capacity Reservation owner and the consumer account. For more information, see [Monitor billing assignment requests for shared Capacity Reservations](billing-ownership-events.md).

------
#### [ Console ]

**To accept or reject a request**

1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/).

1. In the navigation panel, select **Capacity Reservations**.

1. If you have pending requests, the **Pending billing assignment requests** banner appears at the top of the screen. If the banner does not appear, you do not have pending requests.

   To view the requests, choose **Review requests** in the banner.

1. Select the request to accept or reject, and then choose either **Accept** or **Reject**.

------
#### [ AWS CLI ]

**To accept a request**  
Use the [accept-capacity-reservation-billing-ownership](https://docs.aws.amazon.com/cli/latest/reference/ec2/accept-capacity-reservation-billing-ownership.html) command. For `--capacity-reservation-id`, specify the ID of the Capacity Reservation for which to accept the request.

```
aws ec2 accept-capacity-reservation-billing-ownership \
    --capacity-reservation-id cr-01234567890abcdef
```

**To reject a request**  
Use the [reject-capacity-reservation-billing-ownership](https://docs.aws.amazon.com/cli/latest/reference/ec2/reject-capacity-reservation-billing-ownership.html) command. For `--capacity-reservation-id`, specify the ID of the Capacity Reservation for which to reject the request.

```
aws ec2 reject-capacity-reservation-billing-ownership \
    --capacity-reservation-id cr-01234567890abcdef
```

------
#### [ PowerShell ]

**To accept a request**  
Use the [Approve-EC2CapacityReservationBillingOwnership](https://docs.aws.amazon.com/powershell/latest/reference/items/Approve-EC2CapacityReservationBillingOwnership.html) cmdlet.

```
Approve-EC2CapacityReservationBillingOwnership `
    -CapacityReservationId cr-01234567890abcdef
```

**To reject a request**  
Use the [Deny-EC2CapacityReservationBillingOwnership](https://docs.aws.amazon.com/powershell/latest/reference/items/Deny-EC2CapacityReservationBillingOwnership.html) cmdlet.

```
Deny-EC2CapacityReservationBillingOwnership `
    -CapacityReservationId cr-01234567890abcdef
```

------

# Cancel or revoke billing assignment requests for shared EC2 Capacity Reservations
<a name="cancel-billing-transfer"></a>

Only the Capacity Reservation owner can cancel a `pending` billing assignment request. If a pending request is cancelled, it enters the `cancelled` state and billing of any available, or *unused*, capacity of the Capacity Reservation remains assigned to Capacity Reservation owner.

After a request is `accepted`, only the Capacity Reservation owner can revoke billing from the assigned account. If billing is revoked, the request enters the `revoked` state and billing of any available capacity of the Capacity Reservation is reassigned to Capacity Reservation owner.

When a request is cancelled or revoked, Amazon EventBridge events are sent to the Capacity Reservation owner and specified consumer account. For more information, see [Monitor billing assignment requests for shared Capacity Reservations](billing-ownership-events.md).

------
#### [ Console ]

**To cancel or revoke a request**

1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/).

1. In the navigation panel, select **Capacity Reservations** and then choose the Capacity Reservation for which to cancel or revoke the request.

1. In the **Billing of available capacity** section, choose **Cancel transfer** or **Revoke transfer**, depending on the current state of the request.

------
#### [ AWS CLI ]

**To cancel or revoke a request**  
Use the [disassociate-capacity-reservation-billing-owner](https://docs.aws.amazon.com/cli/latest/reference/ec2/disassociate-capacity-reservation-billing-owner.html) command. For `--unused-reservation-billing-owner-id`, specify the ID of the AWS account to which the request was sent.

```
aws ec2 disassociate-capacity-reservation-billing-owner \
    --capacity-reservation-id cr-01234567890abcdef \
    --unused-reservation-billing-owner-id 123456789012
```

------
#### [ PowerShell ]

**To cancel or revoke a request**  
Use the [Unregister-EC2CapacityReservationBillingOwner](https://docs.aws.amazon.com/powershell/latest/reference/items/Unregister-EC2CapacityReservationBillingOwner.html) cmdlet. For `-UnusedReservationBillingOwnerId`, specify the ID of the AWS account to which the request was sent.

```
Unregister-EC2CapacityReservationBillingOwner `
    -CapacityReservationId cr-01234567890abcdef `
    -UnusedReservationBillingOwnerId 123456789012
```

------

# Monitor billing assignment requests for shared Capacity Reservations
<a name="billing-ownership-events"></a>

Amazon EC2 sends Amazon EventBridge events when the state of a billing assignment request changes.
+ Events are sent to the Capacity Reservation owner when a request enters the following states: `accepted` \$1 `rejected` \$1 `expired` \$1 `revoked`.
+ Events are sent to the requested consumer account when a request enters the following states: `pending` \$1 `expired` \$1 `cancelled` \$1 `revoked`.

For more information about Amazon EventBridge, see the [ Amazon EventBridge User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/).

The following is the Amazon EventBridge event pattern.

```
{
   "version":"0",
   "id":"12345678-1234-1234-1234-123456789012",
   "detail-type":"On-Demand Capacity Reservation Billing Ownership Request pending|accepted|rejected|cancelled|revoked|expired",
   "source":"aws.ec2",
   "account":"account_id",
   "time":"state_change_timestamp",
   "region":"region",
   "resources":[
      "arn:aws:ec2:region:cr_owner_account_id:capacity-reservation/cr_id"
   ],
   "detail":{
      "capacity-reservation-id":"cr_id",
      "updateTime":timestamp,
      "ownerAccountId":"cr_owner_account_id",
      "unusedReservationChargesOwnerID":"consumer_account_id",
      "status":"pending|accepted|rejected|cancelled|revoked|expired",
      "statusMessage":"message
   }
}
```

The following is an example of an event that is sent to the Capacity Reservation owner (`222222222222`) when a consumer account (`111111111111`) accepts a billing assignment request for a shared Capacity Reservation (`cr-01234567890abcdef`).

```
{
   "version":"0",
   "id":"12345678-1234-1234-1234-123456789012",
   "detail-type":"On-Demand Capacity Reservation Billing Ownership Request accepted",
   "source":"aws.ec2",
   "account":"222222222222",
   "time":"2024-09-01Thh:59:59Z",
   "region":"us-east-1",
   "resources":[
      "arn:aws:ec2:us-east-1:222222222222:capacity-reservation/cr-01234567890abcdef"
   ],
   "detail":{
      "capacity-reservation-id":"cr-01234567890abcdef",
      "updateTime":"2024-08-01Thh:59:59Z",
      "ownerAccountId":"222222222222",
      "unusedReservationChargesOwnerID":"111111111111",
      "status":"accepted",
      "statusMessage":"billing transfer status message"
   }
}
```