# Idle ECS Container Instances Due to ASG Minimum Capacity

Canonical: https://www.pointfive.co/efficiency-hub/inefficiencies/idle-ecs-container-instances-due-to-asg-minimum-capacity

[Cloud Efficiency Hub](https://www.pointfive.co/efficiency-hub) 

# Idle ECS Container Instances Due to ASG Minimum Capacity

## Explanation

When ECS clusters are configured with an Auto Scaling Group that maintains a minimum number of EC2 instances (e.g., min = 1 or higher), the instances remain active even when there are no tasks scheduled. This leads to idle compute capacity and unnecessary EC2 charges.Instead, ECS Capacity Providers support target tracking scaling policies that can scale the ASG to zero when idle and automatically increase capacity when new tasks or services are scheduled. Failing to adopt this pattern results in persistent idle infrastructure and unnecessary costs in ECS environments that do not require always-on compute.

## Relevant Billing Model

- EC2 container instances in ECS are billed like regular EC2 instances - by the second, based on type and size

- ASGs that maintain a minimum capacity \> 0 will keep EC2 instances running even if no ECS services or tasks are scheduled

- ECS Capacity Providers can scale ASGs dynamically using target tracking, enabling min = 0 when idle

## Detection

- Identify ECS clusters using EC2 launch type

- Check the associated ASG for a minimum capacity \> 0

- Analyze task scheduling patterns to confirm periods of inactivity

- Correlate EC2 uptime with lack of ECS service or task activity

## Remediation

- Configure an ECS Capacity Provider for the cluster and attach a target tracking scaling policy

- Set the ASG minimum capacity to 0 to allow scale-down during idle periods

- Ensure ECS services are configured with appropriate scaling triggers (e.g., CPU or memory utilization)

- Monitor for unintended delays when new tasks are scheduled to validate scaling responsiveness

## Relevant Documentation

- [Amazon ECS Capacity Providers](https://docs.aws.amazon.com/AmazonECS/latest/userguide/what-is-capacity-providers.html/%22)

- [Using Auto Scaling with ECS](https://docs.aws.amazon.com/AmazonECS/latest/userguide/asg-capacity-providers.html/)

[Submit Feedback](https://hub.pointfive.co/inefficiencies/idle-ecs-container-instances-due-to-asg-minimum-capacity)

## At a glance

Reference

CER-0139

Cloud provider

AWS

Service

AWS ECS

Category

[Compute](https://www.pointfive.co/efficiency-hub/service-category/compute)

Inefficiency type

Inefficient Configuration

## Contributed by

- ### Akarsh Inuganti

---
Source: the public page above. Product screenshots and illustrative interfaces are examples, not live customer data.

