The Big Picture

ECS lets you take your Docker container and run it in the cloud, accessible to the world.

Write code
    |
Build Docker image --> push to Docker Hub or ECR
    |
ECS pulls the image --> runs it as containers (tasks)
    |
Accessible to the world

Four Key Concepts

Concept What It Is
Cluster The environment where all containers live. Think of it as the house.
Task Definition A blueprint — which image to run, ports, CPU/RAM. Like a recipe.
Service What actually runs your tasks. Keeps the right number of containers alive.
Task A single running container — one instance of your Task Definition.

Standard Mode — 3 Steps (Understand This First)

Express Mode now handles all of this in one page automatically. But go through this once so you understand what each piece does. After that, just use Express Mode.

Step 1 — Create a Cluster

ECS → Clusters → Create Cluster

Step 2 — Create a Task Definition

ECS → Task Definitions → Create new Task Definition

Task Definitions are created separately from the cluster. They are reusable blueprints any cluster can use.

Field Example
Task Definition Family nginxdemos-hello
Container name Your label inside ECS (e.g. my-web-app)
Image URI Actual Docker image to pull (e.g. nginxdemos/hello)
Port Port the container listens on (e.g. 80)
CPU / RAM Resources for the container (e.g. 0.5 vCPU / 1 GB)

Container name is just your label. Image URI is the actual Docker image. They are different things.

Nothing runs after this step — it is just a saved blueprint.

Step 3 — Create a Service inside the Cluster