All Products
Search
Document Center

Elastic Container Instance:ECI instance billing

Last Updated:Apr 01, 2026

Elastic Container Instance (ECI) charges for compute resources based on the billing mode you choose when creating an instance. This topic covers billing modes, pricing, billing duration, and cost optimization options.

Note

This topic covers billing for compute resources only. If you attach image caches, expand temporary storage, or configure an Elastic IP Address (EIP), additional charges apply for those resources.

Billing modes

ECI supports two billing modes. Choose based on your workload requirements.

Billed by vCPU and memoryBilled by ECS instance type
How it's chargedBased on the vCPU count and memory size you specify at creation. If the combination isn't supported, ECI adjusts the specs automatically and bills based on the adjusted values.Based on the ECS instance type you specify. Use this mode when you need specific capabilities such as GPU acceleration (for example, ecs.gn5i-c4g1.xlarge).
Billing methodPay-as-you-go, billed per second, invoiced hourlyPay-as-you-go, billed per second, invoiced hourly
Cost optimizationGeneral-purpose savings plansGeneral-purpose savings plans, ECS compute savings plans, reserved instances, Preemptible Instances
Pricing formula(vCPU count × vCPU unit price + memory size × memory unit price) × billing durationECS instance type unit price × billing duration

For workloads that don't require GPUs or local disks, billing by vCPU and memory is recommended. ECI tries multiple ECS instance types (such as ecs.c6.large, ecs.c5.large, and ecs.sn1ne.large) to fulfill your request, improving resource availability.

Important

Billing is based on requested resources, not actual utilization. An instance with 2 vCPUs and 4 GiB memory is billed for the full 2 vCPUs and 4 GiB, regardless of actual CPU utilization or memory usage.

Pricing

Billing by vCPU and memory

ResourceUnit price
1 vCPUUSD 0.0000077/second (USD 0.02772/hour)
1 GiB memoryUSD 0.00000096/second (USD 0.003456/hour)
  • vCPU unit price (per vCPU): USD 0.0000077/second (USD 0.02772/hour)

  • Memory unit price (per GiB): USD 0.00000096/second (USD 0.003456/hour)

Note
  • For instances created using ECS economy compute instance types, the vCPU unit price is USD 0.00000424/second (USD 0.015264/hour).

  • Prices displayed on the purchase page and in bills take precedence over the prices listed here.

Billing by ECS instance type

Prices vary by region. See the ECS pricing page for current rates.

Billing duration

Billing starts when ECI begins pulling the container image (the instance enters the Pending state) and stops when the instance finishes running (the instance enters the Succeeded or Failed state).

Details
Billing startsWhen the container image starts being pulled (Pending state)
Billing endsWhen the instance stops running (Succeeded or Failed state)
GranularityPer second
Not chargedInstances that fail to be created or started

For more information about instance states, see Lifecycle of elastic container instances.

Billing examples

Note

These examples are for reference only. The prices in your bills take precedence.

Example 1: Billed by vCPU and memory

An instance with 2 vCPUs and 4 GiB memory, running for 1 hour:

vCPU cost

Total vCPU cost = vCPU unit price (per second) × seconds × vCPU count

Total vCPU cost = USD 0.0000077 × 3,600 × 2 = USD 0.055440.0000077 × 3600 × 2 = USD 0.05544

Memory cost

Total memory cost = memory unit price (per second) × seconds × memory size (GiB)

Total memory cost = USD 0.00000096 × 3,600 × 4 = USD 0.0138240.00000096 × 3600 × 4 = USD 0.013824

Total hourly cost = USD 0.05544 + USD 0.013824 = USD 0.069264

Billable items in the bill appear as cpu (vCPU) and mem (memory). The following figure shows an example.计费示例3

Example 2: Billed by ECS instance type

An instance created in the China (Hangzhou) region using the ecs.c6.large instance type, the hourly fee is USD 0.06. This is because the unit price of the ecs.c6.large instance type is USD 0.06/hour.

Total hourly cost = ECS instance type unit price × billing duration

Total hourly cost = USD 0.06/hour (unit price of ecs.c6.large in China (Hangzhou))

The billable item in the bill appears as instance_type. The following figure shows an example.计费示例4

Cost optimization

For stable long-running workloads, savings plans and reserved instances reduce costs compared to standard pay-as-you-go pricing. For short-running or interrupt-tolerant jobs, Preemptible Instances offer significantly lower prices.

计费方式
OptionBest forKey constraintsReferences
Savings planStable workloads running 24/7 over a long periodGeneral-purpose savings plans apply to all ECS instance types. ECS compute savings plans apply only to instances created with a specified ECS instance type. Prices are based on hourly commitment, payment method, and term. Savings plans have a slightly higher cost than reserved instances but are more flexible because they are not limited by regions or instance families.Overview and Use savings plans
Reserved instanceStable workloads requiring reserved resourcesApplies only to instances created with a specified ECS instance type. Reserved instances must be matched to apply. Prices are based on region, instance type, OS, payment method, and term. The cost of a reserved instance is similar to the cost of a subscription ECS instance of the same instance type.Overview and Use reserved instances
Preemptible InstanceShort-running, interrupt-tolerant jobsPrices fluctuate with supply and demand. After the protection period expires, the instance may be released due to insufficient inventory or a market price higher than your bid. If you create a preemptible instance by specifying vCPU count and memory size, the system selects a matching ECS instance type based on your requirements for vCPU count, memory size, and prices, and bills at the real-time market price of that type, not at the standard vCPU and memory pay-as-you-go rates.What are preemptible instances? and Create a preemptible elastic container instance
Note

You can purchase both savings plans and reserved instances simultaneously. When both apply, reserved instances offset bills first.