All Products
Search
Document Center

Auto Scaling:Cost optimization for ECI scaling groups

Last Updated:Mar 01, 2026

Auto Scaling can automatically select the lowest-cost ECS instance type when creating elastic container instances during scale-out events. This can reduce costs compared to standard vCPU and memory pricing and makes elastic container instances eligible for reserved instances and savings plans.

Supported instance families

When you enable cost optimization, you specify which instance family Auto Scaling uses to match ECS instance types.

Instance familyDescriptionBest forReferences
Entry-levelShared instance types. Most cost-effective, but may not provide consistent computing performance.Workloads with low CPU utilization.Shared instance families
Enterprise-levelDedicated resources with stable performance.Workloads that require high stability.Overview of instance families
Credit entry-levelBurstable instances that use CPU credits to maintain computing performance.Workloads with generally low CPU utilization and occasional spikes.Overview

Prerequisites

Before you begin, ensure that you have:

Enable cost optimization

Step 1: Create a scaling configuration

  1. Find your scaling group and click Details in the Actions column.

  2. Click the Instance Configuration Sources tab.

  3. On the Scaling Configurations tab, click Create Scaling Configuration.

  4. In the Basic Settings step, locate the Container Group Configurations section.

  5. On the Basic Mode tab, turn on Enable Cost Optimization.

  6. Select the instance family to use: entry-level, enterprise-level, or credit entry-level.

  7. Configure the remaining parameters based on your requirements. For more information, see Create a scaling configuration of the Elastic Container Instance type.

  8. Click Next: Other Settings.

  9. Confirm the settings and click Create Order.

  10. In the confirmation message, click Enable Configuration.

Step 2: Create a scaling rule

Create a scaling rule for the scaling group. For more information, see Create scaling rules.

Note You can also create scheduled tasks and event-triggered tasks to trigger scaling. For more information, see Create scheduled tasks and Create event-triggered tasks.

Step 3: Enable the scaling group

Enable the scaling group. For more information, see the "Enable or disable scaling groups" section in Manage scaling groups.

Verify the results

After a scale-out event occurs, check the elastic container instances in your scaling group:

  • Cost optimization takes effect -- The instance details show that Auto Scaling used the specified ECS instance type to create the elastic container instance.

  • Cost optimization does not take effect -- The instance details show that Auto Scaling created the elastic container instance based on vCPU and memory specifications, without using an ECS instance type.

How cost optimization selects instance types

During each scale-out event, Auto Scaling follows this process:

  1. Queries the unit price of elastic container instances based on vCPU and memory specifications.

  2. Filters the ECS instance types that match your requirements and compares their prices.

  3. Selects the ECS instance type with the lowest price.

The billing outcome depends on the price comparison:

  • ECS instance type is cheaper -- Auto Scaling uses that ECS instance type to create the elastic container instance. The instance is billed at the ECS instance type price. Cost optimization takes effect.

  • No ECS instance type qualifies, or all are more expensive -- Auto Scaling creates the elastic container instance based on vCPU and memory specifications. The instance is billed at the standard vCPU and memory unit price. Cost optimization does not take effect.

Note Elastic container instances created by Auto Scaling can be billed based on ECS instance type prices or vCPU and memory specification prices. For more information, see Billing.

Deploy applications on shared instance types or burstable instances for workloads with low CPU utilization to reduce resource costs without over-provisioning. Elastic container instances created with a specified ECS instance type are eligible for reserved instances and savings plans. For more information, see Billing.

Cost comparison example

Call the DescribeContainerGroupPrice API operation to query the cost of elastic container instances created by Auto Scaling. The following example uses the TradePrice parameter from the API response.

ConfigurationTradePrice
Cost optimization disabled0.00004085
Cost optimization enabled0.00003387

In this example, enabling cost optimization reduced the cost by 17%.

Note Actual savings vary depending on the instance family, specifications, and region. The TradePrice value shown reflects only this specific configuration.

ECI scaling group features

ECI scaling groups share the following features with ECS scaling groups: event-triggered tasks, lifecycle hooks, rolling updates, and notifications. ECI scaling groups also have exclusive features: image cache and cost optimization. For more information, see Feature comparison of different types of scaling groups.