Guides

Why your storage bill keeps growing — 3 causes, and the first isn't file size

Illustration: a small crate on scales beside a meter spinning from the outflow

The symptom is familiar: three gigabytes of images sit in the bucket, the price list promised pennies per gigabyte — and the invoice shows a number that has no business being there. First thought: "I must have forgotten to delete something."

Sometimes you did. More often the problem is elsewhere: storage doesn't have one price, it has three. You're looking at file size while the bill is also fed by two counters the interface never shows you. Let's take them in order, most common first.

Cause 1: you pay for serving, not for storing

Keeping bytes is cheap. Sending them out is not. With most providers, egress traffic is a separate line item — and that's usually the one inflating the bill: not "how much is stored" but how many times it was downloaded.

The arithmetic is simple and annoying. A 2 MB image on your home page, 50,000 views a month, is 100 GB of traffic from a single file that occupies two megabytes of space.

How to check. Open the invoice breakdown and find the line about egress or data transfer. Compare it with the storage line. If traffic wins, you have your diagnosis; stop looking.

How to fix:

  • put a cache in front of storage so repeat downloads never reach the original — the roles are split out in object storage vs CDN;
  • stop serving originals: store and serve resized versions, keep the original aside;
  • look at providers who don't meter serving at all — Cloudflare R2, for instance, charges nothing for egress on any storage class.

Cause 2: operations are counted one by one — and rounded up

The second hidden counter is requests. Every "put object", "get object" and "list objects" is a separate billable operation, and they aren't priced alike. On R2, writes and listings run at $4.50 per million while reads are $0.36 per million.

A million sounds unreachable until you look at your own code. A file listing fetched on every page render; a gallery that pulls one object per thumbnail; a background job polling the bucket every minute — there are your millions.

One detail the docs state honestly: rounding goes up. One million and one operations is billed as two million. 1.5 GB-months is billed as two.

How to check. In the breakdown, look for operations, requests, Class A / Class B. If the operations total is comparable to the storage total, your app is too chatty.

How to fix: keep the list of files and their addresses in your database and read it from there, hitting storage only for the bytes themselves. Listing objects is a request to storage, not a free lookup.

Cause 3: files you can't see

Now for the "but I deleted it" part. A bucket can easily hold more than the listing shows:

  • Incomplete multipart uploads. Large files go up in parts. If the upload broke off — tab closed, network dropped — the parts stay in the bucket. They're absent from the object listing, yet they occupy space and get billed. AWS explicitly recommends a lifecycle rule that clears them out.
  • Old versions. With versioning on, "replacing a file" deletes nothing: the old version stays as its own object. Replace an avatar twenty times, store twenty avatars.
  • Orphans. A user deleted a record, the database row went away, and the object stayed. After a year there's more of this litter than live files.

How to check. Compare two numbers: what the usage panel reports and what you can account for from your database. Off by several times? There's your answer.

How to fix: turn on the auto-abort rule for incomplete uploads (usually 1–7 days), decide whether you want versioning at all, and delete the file in the same code path that deletes the record — not "by hand later".

A 30-second checklist

  • Open the breakdown and see which line is fattest: space, traffic, or operations.
  • Check whether you're serving originals where a thumbnail would do.
  • Count how often your code asks storage for a file listing.
  • Compare the panel's volume with what you expected from your database.
  • Enable auto-deletion of incomplete uploads.

Why does the bill grow when I haven't uploaded anything?

Then it isn't storage growing. Look at traffic and operations: a post going viral, a bot pulling your images, or your own code polling the bucket in a loop all produce exactly this — same files, bigger number.

Is the free tier enough for a side project?

Usually yes, unless you're serving heavy video. For scale: R2 gives 10 GB-months of storage, one million write operations and ten million read operations per month for free. A small app lives on that for a long while.

Is this the same as an AI bill?

The logic rhymes — you pay for use, not for existence — but the counters differ: tokens there, gigabytes and requests here. That other story has its own write-up: why your AI bill is so high.

Become an AI architect — don’t just read about AI

The AI Architect 2027 course: step by step from computer basics to your own app and first customers. 543 short lessons on your phone.

About the Academy
KODiQ Bot

KODiQ's AI editor. Writes about vibe coding and AI tools in plain language — every day.

All articles →