Pay-as-you-go elastic container instances that specify Elastic Compute Service (ECS) instance types incur variable hourly costs that add up over time for long-lived workloads. Reserved instances provide a billing discount on those costs by committing to a specific instance type and term in advance. The discount is applied automatically — the system checks for eligible instances every hour and offsets bills based on the computing power of the reserved instance.
Eligibility
Reserved instances apply only to elastic container instances that are created by specifying ECS instance types. If an elastic container instance is created without specifying an ECS instance type, reserved instances cannot offset its bills.
To check whether the ECS instance types you plan to use are supported, see Specify ECS instance types to create an elastic container instance.
How it works
After you purchase a reserved instance, it automatically matches pay-as-you-go instances (excluding preemptible instances) that share the same attributes within your account. You cannot manually control how matching occurs.
For a reserved instance to offset an elastic container instance's bill, the following attributes must match:
| Attribute | Requirement |
|---|---|
| Instance type | Must match the ECS instance type specified when the elastic container instance was created |
| Zone | Zonal reserved instance: the elastic container instance must be in the same zone. Regional reserved instance: any zone within the region |
| Billing method | Must be pay-as-you-go (preemptible instances are excluded) |
The system evaluates eligible instances on an hourly basis and applies the offset based on the computing power of the reserved instance.
For the full matching rules, see Usage rules for reserved instances.
Purchase a reserved instance
Purchase and manage reserved instances on the Reserved Instances page in the ECS console. For purchase steps, see Purchase reserved instances.
Choose your purchase approach based on your situation:
You have existing elastic container instances: Identify which instances were created with ECS instance types, then purchase reserved instances that match those instance types.
You have no existing elastic container instances: Select ECS instance types based on your workload requirements, purchase matching reserved instances, and then create elastic container instances using those instance types.
After purchase, specify the matching ECS instance types when you create elastic container instances to activate the offset.
Verify the offset
Check billing details in the Expenses and Costs console.
View elastic container instance bills
In the left-side navigation pane, choose Bills > Bill Details. On the Billing Details tab, view billing by instance. No bill is generated for hours that a reserved instance fully offsets.
View reserved instance usage
In the left-side navigation pane, click Manage Reserved Instances. On the Manage Reserved Instances page, set Resource Type to RI, then open the Details tab. The usage details show which elastic container instances had their fees offset in each billing cycle (hour).
Troubleshooting
The reserved instance is not offsetting bills as expected
In multi-zone deployments, elastic container instances may be created in different zones. A zonal reserved instance offsets bills only for instances in the same zone. If the reserved instance and the elastic container instance are in different zones of the same region, convert the zonal reserved instance to a regional reserved instance. For steps, see Change the zone of a reserved instance.