1.ECS Core Vocabulary
A task definition is the blueprint for a container app. A task is one running instance of that blueprint. A service keeps a desired number of tasks running long-term, replacing any that die. A cluster is the logical grouping all of this runs inside. A capacity provider decides what infrastructure (EC2 or Fargate) actually runs the tasks.
Key features
- Task definition: the versioned blueprint — container image, CPU/memory, ports, environment, roles
- Task: one running instance of a task definition; a batch job runs a task once and stops
- Service: keeps a desired count of tasks running long-term, replacing failed or stopped tasks
- Cluster: the logical grouping of infrastructure and services/tasks
- Capacity provider: determines whether tasks run on EC2 instances or serverless Fargate
- Service discovery (via AWS Cloud Map) lets tasks find each other by DNS name instead of hardcoded IPs
- Cluster — the logical grouping everything runs inside
- Service — keeps N tasks running, replaces failures
- Task — one running instance of a task definition
- Task definition — the versioned blueprint — image, CPU/memory, roles
Signature
cluster → service → task → task definition
Task definition = blueprint. Task = one running instance. Service = keeps N tasks running, replaces failures. Cluster = the logical grouping. Capacity provider = EC2 or Fargate.