The mental model
A container image packages application code and its userspace dependencies. ECR stores images; it does not run them. ECS schedules tasks, and Fargate can provide compute capacity without you managing the host instances. A task definition describes details such as the image, CPU, memory, networking, and role configuration.
An ECS task execution role supports actions such as pulling an image and delivering logs. A task role gives the application permissions to access AWS services. Keep these purposes separate. Use identifiable image versions, externalize durable state, and define resource limits and health behavior before increasing the number of tasks.
Decisions to make
- Use an immutable image reference for a release you need to reproduce.
- Give the application task role only the resource access its code requires.
Design exercise · no AWS resources needed
Work through a scenario
A team pushes a new image but the running service still shows the old version.
- Separate the registry image from the service’s configured task definition.
- Describe a new deployment referencing the intended image.
- List how you will verify health and identify the running release.
Check your understanding
What is ECR responsible for?
Choose an answer to see the reasoning.
Continue with AWS documentation
Before following a deployment guide, review current pricing, permissions, and cleanup steps. Budget alerts are not a hard spending cap.