Automatically increases or decreases the number of running ECS tasks based on demand.

More traffic → more tasks. Traffic drops → tasks removed. Cost and performance managed automatically.

What Triggers Scaling

ECS watches these CloudWatch metrics:

Three Scaling Strategies

Strategy How It Works Best For
Target Tracking Set a target metric value, ECS maintains it automatically Simplest — set and forget
Step Scaling CloudWatch Alarm crosses threshold → add/remove specific number of tasks More control over each step
Scheduled Scaling Scale at a specific date and time Predictable traffic patterns

Examples:


Two Levels of Scaling — Important Distinction

This is a common confusion point.

ECS Service Auto Scaling EC2 Auto Scaling
What scales Number of ECS Tasks (containers) Number of EC2 instances (servers)
Level Task level Infrastructure level
Configured where When creating the Service During Cluster creation

They are completely separate. Adding more tasks does not add more EC2 instances, and vice versa.


Fargate vs EC2 Launch Type — Scaling Difference