Amazon ECR pricing explained
Private ECR repositories cost $0.10 per GB-month of stored image data in us-east-1 at the time of writing, with an archive storage class at $0.04 per GB-month for images you rarely pull. Pulls by EC2, Fargate or Lambda in the same Region have no transfer charge, while pulls to the internet or another Region pay normal data transfer rates.
Pricing dimensions
| Dimension | Unit | us-east-1 price |
|---|---|---|
| Image storage | GB-month | $0.10 |
| Archive storage class | GB-month | $0.04 |
| Restoring archived images | GB | $0.03 |
| Pulls within the same Region | GB | Free |
| Pulls to the internet | GB | Data transfer out rates |
From the AWS Price List API at the time of writing. Storage is measured on compressed layers, and layers shared between images in a repository are stored once. Basic vulnerability scanning is free; enhanced scanning is billed by Amazon Inspector.
Worked examples
1. A typical service registry. 50 GB of images: 50 × $0.10 = $5.00 a month.
2. CI without a lifecycle policy. 20 builds a day, each adding about 300 MB of new layers, kept for three months: 0.3 × 20 × 90 = 540 GB, so 540 × $0.10 = $54.00 a month and growing. A lifecycle rule keeping the last 30 images per repository holds it near the first example.
3. Archiving old releases. 500 GB of release images kept for audit: 500 × $0.10 = $50.00 in standard storage, or 500 × $0.04 = $20.00 archived. Restoring 50 GB of them costs 50 × $0.03 = $1.50.
Where pulls cost money
- Private subnets pulling through NAT: the pull itself is free, but NAT processing is not; an S3 gateway endpoint plus ECR interface endpoints avoids it. See VPC endpoint pricing.
- Cross-Region pulls bill inter-Region transfer on every pull; replicate the repository instead.
- Pulls from outside AWS (laptops, other clouds) bill internet egress.
- Pull-through cache repositories store upstream images and bill them as normal storage.
Seeing ECR cost
ECR storage shows as TimedStorage-ByteHrs under EC2 Container Registry in Cost Explorer, archive storage
as USE1-TimedStorage-Archive-ByteHrs. To find the largest repositories:
aws ecr describe-images --repository-name my-repo \
--query 'sum(imageDetails[].imageSizeInBytes)'
Run it per repository from aws ecr describe-repositories. Image sizes reported are compressed sizes and
do not account for shared layers, so the total is an upper bound.
Lifecycle policies in practice
A lifecycle policy is a list of rules evaluated per repository, such as "expire untagged images older than 7 days" and "keep only the 30 most recent images tagged with a release prefix". Test a policy with the preview feature before applying it, because expired images cannot be pulled again. Images still referenced by running ECS tasks or Kubernetes pods are not protected automatically, so keep enough history for rollbacks.
Free allowances
New accounts get a limited monthly allowance of private repository storage under the free tier, and ECR Public has its own free storage and anonymous pull allowances. Check the ECR pricing page for the current numbers before relying on them.
Questions
How much does ECR cost per GB?
$0.10 per GB-month of image storage in us-east-1 at the time of writing, or $0.04 in the archive storage class.
Are ECR pulls free?
Pulls from AWS compute in the same Region have no data transfer charge. Pulls through a NAT gateway pay NAT processing, and pulls to another Region or the internet pay data transfer.
Is ECR image scanning free?
Basic scanning is free. Enhanced scanning uses Amazon Inspector and is billed by Inspector per image scanned.
Registry cost rarely needs urgent attention, but a deploy that cannot pull an image does. CloudConsole is being built to show deploy failures and alarms on a phone.
About the app → · Download on the App Store