Chapter 07 of 12
AMAZON ECS
ECS concepts
ECS in one sentence
Amazon ECS is a scheduler that keeps your containers running. It decides what runs, how many copies, and where. The machines underneath are either EC2 instances in your account or Fargate, where AWS runs the machine for you.
Two layers

Scaling is always two separate questions:
- How many tasks do I want? Service Auto Scaling changes the task count.
- Do I have machines to put them on? The capacity provider grows or shrinks the Auto Scaling group.
Five nouns, bottom up
| Noun | What it is |
|---|---|
| Image | The container image, stored in Amazon ECR |
| Task definition | The blueprint: image, CPU, memory, port, roles, logging |
| Task | One running copy of a task definition |
| Service | Keeps N tasks running behind a load balancer |
| Cluster | The group that holds services and capacity |
A task definition is a class. A task is an instance of it. A service keeps the right number alive.

