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


Related guides


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