Builds and tags container images
Cloud / Knowledge library
Amazon Elastic Container Registry
Stores and distributes private or public container images integrated with AWS compute
Why learn Amazon Elastic Container Registry?
Teams use Amazon Elastic Container Registry to adopt container and artifact registry without building the complete underlying platform themselves.
The problem it solves
Stores, versions, scans, and distributes container images and packages
Where it came from
Amazon Elastic Container Registry is Amazon Web Services's offering for container and artifact registry. Its closest catalog counterparts are Azure Container Registry and Google Artifact Registry; they address the same broad need but are not feature-for-feature identical.
Build your understanding
Work through these exercises in order. Try the task before opening a reference.
- Explain the main responsibility of Amazon Elastic Container Registry.
- Choose a workload that fits Amazon Elastic Container Registry.
- Identify one operational tradeoff of Amazon Elastic Container Registry.
- Compare Amazon Elastic Container Registry with Azure Container Registry.
- Compare Amazon Elastic Container Registry with Google Artifact Registry.
Documentation and sources
- AWS cloud services catalog (aws.amazon.com)
Connect the ideas
Alternatives
Real World Example
Standardizing Container Distribution for Global Logistics
A global logistics firm managing a fleet of microservices that track cargo shipments across international borders.
The business problem
The firm faces inconsistent deployment environments because developers manually build and share container images via unmanaged local registries, leading to 'it works on my machine' failures during production rollouts.
How this topic solves it
By implementing Amazon Elastic Container Registry (ECR), the firm centralizes image storage and distribution. ECR provides a secure, private repository that integrates directly with AWS compute services, ensuring that the exact same container image is pulled by production environments regardless of the region.
- Create a private ECR repository to serve as the single source of truth for application images.
- Configure IAM policies to grant specific CI/CD pipeline roles permission to push images to the repository.
- Authenticate the local or CI/CD environment using the ECR get-login-password command.
- Tag and push the container images to the ECR repository URI.
- Reference the ECR image URI in the task definition for AWS compute services to pull the image during deployment.
This diagram illustrates the flow of container images from the developer environment to the production compute service via ECR.
Authenticates and pushes images
Stores private container images
Pulls and runs the container
- Developer → Triggers build → CI/CD Pipeline
- CI/CD Pipeline → Pushes image → Amazon ECR
- Amazon ECR → Distributes image → AWS Compute
Expected business outcome
The organization achieves environment parity, where the container image verified in staging is identical to the one deployed in production, significantly reducing deployment-related configuration errors.
Limitations and checks
ECR repositories are regional, meaning an image pushed to a repository in one AWS region is not automatically available in another. To check for this, verify the repository URI region prefix against the deployment target region.