iTranslated by AI
Amazon ECR Now Supports Blob Mounting!
With the update on January 20th, Amazon ECR now supports blob mounting.
This allows layers to be shared across multiple ECR repositories if they are identical, which saves storage usage and leads to cost reductions.
Although layer sharing already existed between images within the same repository before this feature was implemented, this update has expanded that capability across different repositories!
There are two ways to enable this: via the Management Console or the AWS CLI. Simply go to Private registries -> Features and settings and enable blob mounting.
Once enabled, it applies to all private repositories within the same AWS account and region.
Please note that you need to configure this separately for ECR in different regions.
Be aware of the following limitations regarding layer sharing:
- Blob mounting only works within the same registry (same account and region).
- Repositories must use identical encryption configurations.
This requirement for matching encryption settings likely refers to the following items when creating an ECR private repository:

Using the AWS Management Console
Access the ECR console (https://us-east-1.console.aws.amazon.com/ecr/private-registry?region=us-east-1),

Using the AWS CLI
Execute the following command.
Specify --region or your profile as needed.
aws ecr put-account-setting --name BLOB_MOUNTING --value ENABLED
Using Terraform
It is not yet supported in Terraform, but a PR has been created and approved, so it should be implemented soon!
Based on the PR, I expect the usage to look something like this:
resource "aws_ecr_account_setting" "blob_mounting" {
name = "BLOB_MOUNTING"
value = "ENABLED"
}
Summary
Once set up, OCI clients (like Docker or Podman) will automatically detect and use existing layers during a push!
OCI clients automatically add mount parameters when they detect that a blob might already exist in another repository. Amazon ECR only attempts the mount if these parameters are included in the client's POST request.
https://docs.aws.amazon.com/AmazonECR/latest/userguide/blob-mounting.html
This update is a significant change that effectively reduces both ECR costs and image push times.
It will be extremely beneficial for environments with large image repositories or those using common base images across multiple microservices.
Since the configuration only needs to be done on a per-region basis, I think it can be implemented very quickly.
With various updates continuing, such as the support for private repositories in pull-through cache last year, I am very excited about what is coming next.
Discussion