Estimate ECR storage (GB-month) from images and retention
Registry storage cost is usually driven by how many images you keep and how large they are. You can get a good estimate with a simple model (average size × images retained), then refine it using push frequency and retention windows.
Step 1: define repo classes (do not use one average)
- CI artifacts: many tags/day, short retention (should be cheap if retention works).
- Releases: fewer tags, longer retention (rollback needs).
- Base images: few images but large and shared across many services.
Fast model (good for budgeting)
- Stored GB-month ~= avg image size (GB) × retained images (count)
- Retained images per repo ~= tags retained × (variants per tag)
- If you store multi-arch variants separately, variants per tag can be 2 (amd64 + arm64) or more.
Better model (push frequency + retention days)
This model is useful for repos where CI pushes constantly.
- Pushes/day = N
- Retention days = D
- Retained images ~= N × D (per repo or repo class)
- Stored GB ~= retained images × avg image size
Worked example
- Avg image size: 0.8 GB
- CI pushes: 40 images/day
- Retention: 14 days
- Retained images ~= 40 × 14 = 560 images
- Stored GB ~= 560 × 0.8 ~= 448 GB-month (order-of-magnitude)
Common multipliers (what makes storage explode)
- No retention: “keep forever” means storage grows without bound.
- Multi-arch: storing multiple variants can multiply retained GB.
- Large base images: shared images can dominate storage even if app images are small.
- Environment duplication: separate repos/tags for prod/staging/dev with independent retention.
What to measure first (so your estimate converges)
- Average image size by repo class (CI vs release vs base images).
- Push frequency per repo (images/day) for the top 10 repos by activity.
- Retention rules (days or tags) and whether untagged images are deleted.
- Whether multi-arch variants are retained equally (amd64 + arm64 doubles storage if both are kept).
Turn storage into cost
Use AWS ECR Cost Calculator with your stored GB-month estimate and your effective $/GB-month.
Validation checklist
- Pick 3 representative repos and measure average image size and retained tags.
- Validate retention policies actually delete old tags (and untagged images).
- Validate multi-arch behavior (are variants stored separately and retained equally?).
- After changes, compare predicted GB-month to registry-reported storage.
Sources
- ECR pricing: aws.amazon.com/ecr/pricing
- ECR lifecycle policies: docs.aws.amazon.com
Related guides
RDS vs Aurora cost: what to compare (compute, storage, I/O, and retention)
A practical RDS vs Aurora cost comparison checklist. Compare unit economics, scaling model, storage growth, backups/retention, and the workload patterns that change the answer.
Aurora pricing (what to include): compute, storage, I/O, and backups
A practical checklist for estimating Aurora costs: instance hours (or ACUs), storage growth, I/O-heavy workloads, backups/retention, and the line items that commonly surprise budgets.
ECR cost optimization: retention, smaller images, fewer pulls
A high-leverage playbook to reduce AWS ECR cost: enforce retention, shrink images, reduce redundant pulls in CI and clusters, and validate savings without breaking rollbacks.
Estimate RDS backup storage (GB-month) from retention and churn
A practical method to estimate RDS backup storage (GB-month): start from daily changed data, retention days, and sanity-check with snapshot sizes. Includes common mistakes that inflate backup cost.
AWS RDS cost optimization (high-leverage fixes)
A short playbook to reduce RDS cost: right-size instances, control storage growth, tune backups, and avoid expensive I/O patterns.
AWS RDS pricing (what to include)
A practical checklist for estimating AWS RDS costs: instances, storage, backups, I/O, and the line items that commonly surprise budgets.
FAQ
What is GB-month?
GB-month is average stored gigabytes over the month. If you store 1,000 GB all month, that's 1,000 GB-month.
Why do registry costs grow over time?
Because teams keep every tag forever and rebuild images frequently. Without retention policies, old images accumulate even if nobody pulls them.
Last updated: 2026-01-27