Getting Started on AWSLanding zone and Amazon ECS on EC2 · live course guide
Home

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

Two layers: the service and tasks on top, EC2 instances, capacity provider and Auto Scaling group below
Two layers: the service and tasks on top, EC2 instances, capacity provider and Auto Scaling group below

Scaling is always two separate questions:

  1. How many tasks do I want? Service Auto Scaling changes the task count.
  2. 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.