Amazon ECR: Storing Container Images
By the end of this lesson, you'll be able to:
- Explain what Amazon ECR provides and what it explicitly does not do
- Describe the repository/image/tag structure ECR is organized around
- Explain why ECR access should be controlled with IAM rather than embedded credentials
Prerequisites: "Containers on AWS: Concepts and Docker Basics"
A managed home for container images
Amazon ECR (Elastic Container Registry) is a managed container registry — a place to store, version, and retrieve container images. Once an image is built (the previous lesson's Dockerfile-to-image step), it needs somewhere for other systems to pull it from later, whether that's a teammate's machine, a CI pipeline, or — the subject of the next two lessons — a running ECS or Fargate task.
Repositories, images, and tags
ECR organizes images into repositories — each repository typically corresponds to one application or component. Within a repository, each pushed image gets a tag (a label, such as a version number or a build identifier) so specific versions can be referenced and retrieved deliberately, rather than only ever having "whatever the latest push happens to be."
What ECR does — and what it explicitly does not do
This is worth stating plainly, because the name alone doesn't make it obvious: ECR stores images; it does not run them. A pushed image just sits in ECR, versioned and ready, until something else — an ECS task, a Fargate task, or a developer's own machine — pulls it and runs it as a container.
Access control: IAM, not embedded credentials
Pushing to and pulling from ECR is controlled by IAM permissions (Module 2), the same least-privilege discipline this course has applied to every AWS service so far — a CI pipeline that only needs to push new images shouldn't be granted broader ECR (or account-wide) permissions than that. Access to ECR should never depend on a real access key embedded in a script or a container image; the identity performing the push or pull (a CI pipeline's role, a developer's own credentials, or a task's own IAM role, covered in a later lesson) should authenticate through IAM the same way every other AWS interaction in this course has.
Exercise
A teammate says "we push our images to ECR, and ECR runs them for us in production." Using this lesson's distinction, explain what's actually incorrect about that statement, and what really happens to an image after it's pushed to ECR.
Show hint
ECR is a storage and versioning service for images — something else has to actually pull and run one.
Amazon ECR: Storing Container Images Quiz
My Notes
Log in to keep private notes on this lesson.
Questions about this lesson
No questions yet — be the first to ask.
Log in to ask a question about this lesson.
Summary
Amazon ECR is a managed container registry that stores and serves container images, organized into repositories with tagged image versions, controlled by IAM permissions — and it is worth stating precisely that ECR only stores images; it does not itself run application containers.