Amazon Elastic Container Registry (Amazon ECR)
Cloud service · AWS · Updated

Amazon Elastic Container Registry (Amazon ECR)

In short

Amazon Elastic Container Registry (Amazon ECR) is a fully managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images.

Cloud Services Hub →

9 key features of Amazon Elastic Container Registry (Amazon ECR)

Amazon Elastic Container Registry (Amazon ECR) is a fully managed Docker container registry that allows users to easily store, manage, and deploy Docker container images.

01
Fully Managed

Amazon ECR is a fully managed container registry that makes it easy for developers to store, manage, and deploy Docker container images. It eliminates the need to operate your own container repositories or worry about scaling the underlying infrastructure.

02
Highly Scalable

ECR can scale seamlessly to meet your development workflow's demand, regardless of the volume of container images or the frequency of requests. This ensures that your deployment scales efficiently with your application.

03
Integrated with Amazon ECS and EKS

ECR is deeply integrated with Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS), providing a simplified development workflow where you can easily push your images to ECR and pull them directly from your Amazon ECS or EKS clusters.

04
Private Registries

ECR provides private container registries that allow you to host your Docker images in a secure and scalable environment. You can control access to your images using AWS Identity and Access Management (IAM) policies.

05
Security Scanning

Amazon ECR supports automatic scanning for operating system vulnerabilities and scans initiated through an API command. Enhanced image scanning can be enabled through Amazon Inspector.

06
Cross-Region Replication

ECR supports cross-region replication enabling automatic replication of your container images to other AWS Regions. This improves the load times of your applications and enhances disaster recovery strategies.

07
Immutable Image Tags

ECR supports immutable image tags, which prevent image tags from being overwritten. This ensures that your deployments are consistent and reduces the risk of accidental overwrites of working container images.

08
Lifecycle Policies

You can define rules that clean up older images automatically, ensuring efficient usage of storage and keeping your repositories organized. Lifecycle policies help in managing the lifecycle of images stored in your registry, such as expiring old images based on specific criteria.

09
Encrypted at Rest and In-Transit

Amazon ECR automatically encrypts images at rest using Amazon S3 server-side encryption or AWS KMS encryption and transfers container images over HTTPS.

Where Amazon Elastic Container Registry (Amazon ECR) is used

Amazon Elastic Container Registry (Amazon ECR) enables secure, scalable, and efficient storage, management, and deployment of container images for applications running on a wide range of AWS services and on-premises environments.

  1. 01
    Continuous Integration and Continuous Deployment (CI/CD)

    Amazon ECR can be integrated with CI/CD pipelines to automate the build, test, and deployment process of containerized applications. Developers can push their Docker or OCI images to ECR after a successful build, and orchestration services like Amazon ECS or Kubernetes can pull these images to deploy updates automatically.

  2. 02
    Secure Storage of Container Images

    Amazon ECR provides a secure location to store, manage, and deploy Docker and Open Container Initiative (OCI) images. It uses AWS Identity and Access Management (IAM) to control access to the images, ensuring that only authorized users or services can push or pull images. ECR also offers vulnerability scanning to detect security issues within your images.

  3. 03
    Application Version Control and Rollbacks

    By leveraging ECR, teams can easily manage different versions of their container images, allowing for easy rollbacks to previous versions in case of failures or issues with the latest deployments. ECR supports image tagging, which simplifies the process of version control and deployment strategies like canary or blue-green deployments.

  4. 04
    Geographically Distributed Deployments

    ECR can replicate container images across multiple AWS regions, facilitating faster image pulls for geographically distributed applications and reducing latency. This capability supports building highly available, fault-tolerant applications and ensures that global users experience minimal delays.

  5. 05
    Easy Integration with AWS Ecosystem

    ECR seamlessly integrates with other services in the AWS ecosystem, such as Amazon Elastic Container Service (ECS), Amazon Elastic Kubernetes Service (EKS), AWS Lambda for serverless applications, and AWS Fargate for running containers without managing servers. This integration allows for a smooth deployment process and easy scaling of applications as needed.

How Amazon Elastic Container Registry (Amazon ECR) is priced

Amazon ECR pricing is based on the amount of data stored in your repositories and the data transferred to the internet, with no upfront fees or commitments, and offers a free tier for certain amounts of storage and data transfer.

Data Transfer

Amazon ECR charges for data transferred to the internet. Transfer from a private repository is billed to the AWS account that owns it. Transfer from a public repository is free up to the applicable limits; beyond those limits, it is billed to the AWS account downloading from the repository.

Storage Pricing

ECR charges a monthly fee for the storage space your container images occupy. This fee is based on the amount of data stored, measured in gigabytes per month.

Image Scanning

Amazon ECR offers image scanning on push to detect vulnerabilities. Basic image scanning is free. Enhanced scanning through Amazon Inspector charges for initial image scans and eligible rescans, and the cost is based on the number of images scanned.

Archive Storage and Retrieval

Archive storage has a minimum billable duration of 90 days; deleting an image earlier incurs a prorated charge for the remaining days. Retrieving archived images incurs a per-GB retrieval charge.

Managed Signing

ECR managed signing is charged per successfully generated image signature. Failed signing attempts, including failures caused by misconfigured permissions, are not charged.

KMS and Dual-Layer Encryption

SSE-KMS incurs AWS KMS charges for generating or retrieving data keys. DSSE-KMS incurs those KMS charges plus an additional per-GB fee for its second encryption and decryption layer.

AWS Free Tier

Starting July 15, 2025, new AWS customers can receive up to $200 in Free Tier credits applicable to eligible services including ECR. The free plan lasts six months after account creation, and credits must be used within 12 months of account creation.

Services Amazon Elastic Container Registry (Amazon ECR) works with

AWS FargateAWS Fargate

AWS Fargate integrates with Amazon ECR to pull container images required to run serverless container-based applications.

AWS CodePipelineAWS CodePipeline

AWS CodePipeline uses Amazon ECR to automate build, test, and deploy cycles for containerized applications.

AWS CodeBuildAWS CodeBuild

AWS CodeBuild can use Amazon ECR to retrieve and push Docker images as part of a continuous integration process.

Amazon CloudWatchAmazon CloudWatch

Amazon CloudWatch integrates with Amazon ECR to provide monitoring, logging, and alerting for container repositories.

AWS CloudTrailAWS CloudTrail

AWS CloudTrail integrates with Amazon ECR to log API calls and track changes made to container repositories.

AWS LambdaAWS Lambda

AWS Lambda can use container images stored in Amazon ECR to run serverless functions.

Amazon S3Amazon S3

Amazon S3 can be used with Amazon ECR to store and retrieve large amounts of image layers and artifacts.

Alternatives to Amazon Elastic Container Registry (Amazon ECR) in other clouds

Azure

Azure Container Registry

Amazon Elastic Container Registry and Azure Container Registry are managed services for storing and distributing container images and OCI artifacts. Amazon ECR bills for storage by usage and replicates images to other AWS Regions, while Azure Container Registry charges by tier with included storage and uses Premium to replicate a single logical registry across regions.

Compare fact by fact
Amazon Elastic Container Registry (Amazon ECR)Azure Container Registry
Storage billingPer GB-month storedTier fee plus storage overage
Multi-region replicationImage copies in other AWS RegionsOne registry across regions (Premium)
Repository access controlAWS IAM policiesAzure RBAC with optional ABAC

What is Amazon Elastic Container Registry (Amazon ECR)

3 min read

Amazon Elastic Container Registry (ECR) is a fully managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images. It's integrated with Amazon Elastic Container Service (ECS), but can also be used with any Docker-based application. 

Amazon ECR also supports pushing and pulling Open Container Initiative (OCI) images and artifacts, and can translate between Docker Image Manifest V2, Schema 2 images and OCI images on pull.

Amazon ECR eliminates the need for you to operate your own container repositories or worry about scaling the underlying infrastructure. It handles the complexity of managing the storage and enables you to securely store, organize, and manage your containers in a highly scalable and secure environment. Amazon ECR uses AWS Identity and Access Management (IAM) to control access to your containers, ensuring that only authorized users or services can access your images. This tight integration with AWS security model means you can create policies to control access to your images, ensuring that sensitive software stays secure. Additionally, ECR automatically encrypts your images at rest and provides methods to encrypt the data in transit, adding an extra layer of security. 

ECR managed signing automatically signs images as they are pushed, using the identity of the entity pushing the image. Image signing lets you verify that images come from trusted sources.

ECR also supports dual-layer server-side encryption with keys stored in AWS Key Management Service (DSSE-KMS), adding a second layer of encryption and decryption.

Basic image scanning has a non-adjustable quota of 100,000 images per 24 hours per account and Region, counting both scan-on-push and manual scans.

A significant benefit of using Amazon ECR is its scalability. It scales automatically to meet your storage requirements, removing the hassle of planning for capacity and managing infrastructure to store your container images. This is particularly beneficial for organizations that may experience variable demand for their applications. With ECR, you can focus on developing your applications rather than managing the infrastructure needed to store and share container images. 

The default quota is 100,000 images per repository in each supported Region. This quota is adjustable.

The maximum image layer size is 52,000 MiB, and this quota is not adjustable.

ECR offers two storage classes: Standard, the default for active container images, and Archive, for inactive images requiring long-term storage. Archived images must be retrieved before they can be pulled.

Another key feature of Amazon ECR is its integration with Amazon ECS and Amazon Elastic Kubernetes Service (EKS), which simplifies your development to production workflow. You can easily push your Docker images to Amazon ECR and then deploy them to Amazon ECS or EKS with a simple set of commands. This integration streamlines the process of container management, from storage to deployment, making it faster and more efficient. Moreover, Amazon ECR supports private image repositories, enabling you to securely share container software within your organization or with select partners without making it public. This feature is especially useful for organizations that need to enforce strict access controls and comply with regulatory requirements. 

Amazon ECR also offers public repositories, whose images anyone can pull without an AWS account or IAM credentials. Public repository images are available in the Amazon ECR public gallery.

In conclusion, Amazon Elastic Container Registry provides a secure, scalable, and easy-to-use environment for storing and managing Docker container images. Its deep integration with AWS services, such as IAM, ECS, and EKS, alongside features like automatic encryption, private repositories, and highly scalable infrastructure, makes it an attractive solution for developers looking to streamline their container management processes. Whether you're a small developer team or a large enterprise, Amazon ECR offers the tools and security you need to manage your container images efficiently.

Amazon Elastic Container Registry (Amazon ECR) exam questions

Real practice exam questions on Amazon Elastic Container Registry (Amazon ECR), with the correct answer and its explanation. Answer them with every option in the exam simulator.

CLF-C02

A software vendor wants to publish an open-source application as a container image. Customers must be able to discover the image in a public catalog and pull it without signing in, whether they run containers on AWS or in their own data centers. The vendor does not need to run the application for customers. Which solution best meets these requirements?

Show answerCORRECT ANSWER

Publish the image in an Amazon ECR Public repository.

Amazon ECR Public stores and distributes publicly accessible container images. Customers can discover images through the ECR Public Gallery and pull them without authentication for use on AWS or elsewhere.

DVA-C03

A company builds container images in one AWS account and pushes them to private Amazon ECR repositories. It wants new images pushed to repositories whose names begin with release/ to appear automatically in the production account's private registry. The destination repositories do not yet exist and must be created automatically. The build pipeline must continue pushing only to the build account. The production deployment job checks for the expected image digest in the destination repository and starts workloads only after the digest appears. It does not pull the image to populate the repository. Which solution meets these requirements?

Show answerCORRECT ANSWER

Configure replication in the build account's registry with a `release/` repository prefix filter and the production registry as the destination. In the production registry permissions policy, grant the build account `ecr:ReplicateImage` and `ecr:CreateRepository`.

New pushes to matching source repositories trigger asynchronous replication. The destination policy permits ECR to replicate images and create missing repositories. The deployment job waits for the digest, so replication does not have to complete synchronously.

SAP-C03

A company runs Amazon Linux EC2 container hosts across 30 AWS accounts in two AWS Regions. All hosts are AWS Systems Manager managed nodes. Application images are stored in private Amazon ECR repositories and contain operating system packages and supported programming-language packages. Images remain deployed for 30 days without necessarily being pushed again.

The company currently uses an AWS predefined patch baseline for the hosts. An existing deployment pipeline distributes account-specific and Region-specific configurations, and maintenance windows run AWS-RunPatchBaseline against designated patch groups.

The security team introduces two requirements:

• Container images must be scanned automatically for operating system and programming-language package vulnerabilities, including newly published vulnerabilities throughout the 30-day deployment period.
• Hosts that are missing patches approved by the baseline must report CRITICAL severity in native Systems Manager patch compliance results, rather than Unspecified. The existing patch approval criteria and maintenance-window workflow must be preserved.

Which solution meets these requirements?

Show answerCORRECT ANSWER

Enable ECR enhanced scanning with continuous scanning for the repositories and configure Amazon Inspector image eligibility to cover at least 30 days. Create regional custom baselines by copying the predefined baseline, preserve its approval criteria, and set the approval rules' compliance level to CRITICAL. Use the existing pipeline to distribute the custom baselines and associate them with the patch groups.

ECR enhanced scanning uses Amazon Inspector to assess operating system and supported programming-language packages and continuously reassess eligible images when relevant vulnerabilities are published. Copying the predefined baseline allows the company to preserve its approval criteria while configuring CRITICAL compliance severity for missing approved patches. Associating the custom baselines with the existing patch groups preserves the maintenance-window execution workflow.

Practice Amazon Elastic Container Registry (Amazon ECR) in a full exam

Questions on Amazon Elastic Container Registry (Amazon ECR) in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

Learn Amazon Elastic Container Registry (Amazon ECR) in lessons

14 short lessons on Amazon Elastic Container Registry (Amazon ECR) in 8 certification courses.

and 8 more lessons

Open the lessons

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.