How much does object storage cost? Storage, requests and egress

Object storage bills per GB stored per month, per request (upload, download, listing) and per GB sent out to the internet. In download-heavy projects, egress often outweighs storage.

Updated 6 min read

Learning objectives

After reading this article you will be able to:

  • Understand the three lines that make up an object storage bill
  • Estimate a project's monthly cost with a reproducible calculation
  • Spot the hidden costs: minimum durations, old versions and incomplete uploads
On this page

The price on an object storage pricing page is the price per stored GB, and it is low: a few cents per month. The bill has other lines, though. Every upload, every download and every listing is a request, and every GB that leaves for the internet can be billed on its own.

The numbers in this article are hypothetical, chosen to keep the math easy. They are not any provider's prices; real prices change over time, vary by region and are on the official pages listed under "sources". You can adapt the full calculation further down to your own project. If the concept is new to you, start with what object storage is.

500 GB bucketmonthly costServes mediaCold filesEgresssame storageStorageUploadsDownloadsEgress
Storage is the same in both cases: what makes the bill grow is the egress from downloads.

What makes up the cost of object storage?#

Nearly every provider charges for three things:

  1. Storage: GB kept per month. Billing is usually proportional to time: 1 TB for half a month costs half of 1 TB for the whole month.
  2. Requests: API operations. Writing (PUT, COPY, POST) and listing (LIST) usually cost more than reading (GET).
  3. Data egress: GB transferred from storage to the internet or to another region. Inbound transfer is usually not charged.

Some providers add lines for cold storage classes (retrieval fees, minimum durations) and for features such as cross-region replication. Billing models vary a lot: some providers charge all three lines, some waive request fees and some don't charge for egress.

How do the big providers bill each line?#

Two references with opposite models:

Line Amazon S3 Standard Backblaze B2 (pay-as-you-go)
Storage Price per GB-month, in tiers that get cheaper with volume Price per TB-month, usually lower per GB
Writes and listings Billed per 1,000 PUT, COPY, POST or LIST Most calls not billed
Reads Billed per 1,000 GET, cheaper than writes Most calls not billed
Egress to the internet Small monthly free allowance (across all AWS services), then a per-GB price in volume tiers Allowance proportional to your stored data, then a low per-GB price
Minimum duration None on Standard None

On S3, both the per-GB storage price and the egress price drop in tiers as volume grows. On B2, some less common calls are billed above a daily allowance. Prices change and vary by region, so check the official AWS and Backblaze pages before committing to a number.

How do you estimate a project's monthly cost?#

You need four numbers: GB stored, number of uploads, number of downloads and GB downloaded per month. Hypothetical example: an app that stores 500 GB of images, receives 1 million uploads and serves 20 million downloads totaling 2 TB (2,000 GB) per month.

The script below runs the numbers for a provider that bills all three lines separately, with hypothetical prices. Replace them with current prices for your provider and region before relying on the result. Save it as storage-cost.mjs and run node storage-cost.mjs:

javascript
// Hypothetical example in US$: a provider that bills all three lines separately.
// These are not any provider's prices; swap in the ones from your provider's official page.
const price = {
  storagePerGB: 0.02, // per GB-month
  putPer1000: 0.01, // per 1,000 PUT, COPY, POST or LIST
  getPer1000: 0.001, // per 1,000 GET
  egressPerGB: 0.1, // per GB to the internet
  freeEgressGB: 100, // monthly free egress allowance
};

const usage = { storedGB: 500, puts: 1_000_000, gets: 20_000_000, egressGB: 2000 };

const lines = {
  storage: usage.storedGB * price.storagePerGB,
  uploads: (usage.puts / 1000) * price.putPer1000,
  downloads: (usage.gets / 1000) * price.getPer1000,
  egress: Math.max(0, usage.egressGB - price.freeEgressGB) * price.egressPerGB,
};
const total = Object.values(lines).reduce((a, b) => a + b, 0);

for (const [name, value] of Object.entries(lines)) console.log(name.padEnd(10), value.toFixed(2));
console.log("total".padEnd(10), total.toFixed(2));

The output:

storage    10.00
uploads    10.00
downloads  20.00
egress     190.00
total      230.00

Storage is 4% of the bill; egress is 83%. Now take a provider that charges US$5 per TB-month, doesn't bill requests and gives an egress allowance of 2 times your stored data, with US$0.02 per GB above it (also hypothetical): the same scenario comes to US$2.50 for storage (0.5 TB), nothing for requests and US$20 for egress (2,000 GB minus the 1,000 GB allowance), US$22.50 in total. Nearly all of the difference comes from the egress policy, not the per-GB price. The article on egress fees explains how that line works.

To get your own numbers, estimate the average file size and multiply it by the number of downloads. A 100 KB file downloaded 20 million times is 2,000 GB.

What hidden costs show up on the bill?#

  • Minimum duration and size on cold classes. S3 Standard-IA charges less per GB-month than Standard, but it bills each object for at least 30 days, charges objects smaller than 128 KB as 128 KB and adds a fee per GB retrieved. A file deleted after a week pays for the whole month. Archive classes have even longer minimums.
  • Old versions. With versioning on, AWS states that each version is the entire object and is billed at normal rates: three versions of a file cost as much as three files. Overwriting a large file every day quietly multiplies your storage.
  • Incomplete multipart uploads. The parts of an upload that never finished stay stored until the upload is aborted. AWS recommends a lifecycle rule with AbortIncompleteMultipartUpload to keep this cost down. See lifecycle rules.
  • Bulk listings. Sync tools that list the whole bucket on every run generate thousands of LIST calls, which S3 bills at the write rate.
  • Cross-region egress and migration. Copying data to another region, or downloading everything to switch providers, is egress billed on the full volume.
  • Spikes and hotlinking. A viral file, or another site linking straight to your images, multiplies egress without any change to your code.

How do you lower an object storage bill?#

  1. Put a CDN in front of public files, with a long Cache-Control. The file leaves storage once and the rest is served from cache. The difference between public and private files decides what can go through the CDN.
  2. Compress and resize before uploading. An 80 KB WebP image instead of a 2 MB JPEG cuts storage and egress at the same time.
  3. Use lifecycle rules to delete temporary files, old versions and incomplete uploads.
  4. Only move files you truly never read to cold classes, and only if they will stay longer than the minimum duration.
  5. Pick a provider for your usage profile. Lots of storage and few downloads: the per-GB price matters most. Lots of downloads: the egress policy matters most. An S3-compatible service makes switching later easier, because your code stays the same.

When is storage the line that matters?#

For cold files, such as backup copies and old logs, there are almost no downloads, so the bill is practically GB times price per GB. Here archive classes and providers with cheap storage make a real difference, as long as you respect the minimum durations. For that case, see how to send backups to object storage.

In apps that serve media to users (profile pictures, attachments, videos), egress dominates and the stored GB price barely matters.

How to do this on Square Cloud#

Square Cloud Blob Storage is object storage with an S3-compatible API (aws-cli, rclone, boto3, AWS SDKs), a REST API and a dashboard. It charges no egress or ingress fees, so the line that dominated the example bill drops out.

Every plan includes a storage quota, from 5 GB to 250 GB. The Hobby plan, from R$12.49 per month, includes 5 to 15 GB of Blob. Public files are served through a global edge CDN, and private files open through a temporary link of up to 24 hours or a share link of up to 30 days.

In place of lifecycle rules, Blob has per-folder rules (expiration, cache, automatic cleanup): the "delete after N days" rule expires old objects on its own, counting from the last write. It accepts files up to 10 GB, and multipart is only required above 100 MB. See quotas and details on the Blob Storage page.

Blob Storage

S3-compatible object storage with no egress fees

Learn more

FAQs

How much does it cost to store 1 TB in object storage?

Storage alone is the volume in GB times the provider's price per GB-month. Assuming US$0.02 per GB-month (a hypothetical value), 1 TB (1,000 GB) comes to US$20 per month; at a hypothetical US$5 per TB-month, it would be US$5. Requests and data egress are billed separately.

Why is my storage bill higher than expected?

Almost always because of data egress (downloads to the internet) or bulk requests. Old object versions, incomplete multipart uploads and retrieval fees on cold classes also add up without showing on the main dashboard.

Are cold classes like Infrequent Access always cheaper?

Only for files that are almost never read. On S3 Standard-IA the stored GB costs less, but there is a per-GB retrieval fee, a 30-day minimum charge and a 128 KB minimum billable object size.

Are uploads charged?

Inbound transfer from the internet is usually free, but every upload is a request. On S3, PUT, COPY, POST and LIST are billed per thousand requests, at a higher rate than GET.

Next articleHow much does it cost to store user uploads and images?Storing user uploads costs per GB stored, per request and per GB of egress. See how each line is billed, a 12-month estimate and the ways to bring the bill down.

More in Storage

See all 15 articles