← All posts

Reduce S3 Egress Costs by Compressing Your Files

Updated 2026-10-21

Amazon S3 charges for storage and for getting data out of it. Compression helps with both — one archive can turn hundreds of small objects into a single, smaller transfer. Here is where it actually pays off.

Where the money goes

  • Requests: every object is a request. Zipping a folder of 5,000 small files means one download instead of 5,000.
  • Egress: you pay per GB transferred out of AWS — and every object you hand out is transferred.
  • Storage: an archive occupies less space than the same files uncompressed.
  • Time and instances: download–zip–upload needs bandwidth and compute that you also pay for.

What compresses well

  • Text: CSV, JSON, logs, XML, source code — often 70–90% smaller.
  • Documents that are not already compressed: many PDF and Office files still shrink.
  • Mixed folders: the win depends heavily on the mix.

What does not

Already-compressed formats — JPEG, PNG, MP4, ZIP/GZIP themselves — barely shrink, and some may grow slightly. Zipping them is still useful for bundling, but not for saving bytes.

Example: a monthly invoice batch

Say you publish 1,200 invoice PDFs a month and customers download them. Without zipping, that is 1,200 requests plus the full byte count. With one archive per customer, it is one request and the compressed total — and the bank-transfer-grade PDFs still compress meaningfully because they share fonts and structure.

Doing it without a server

The zipping itself can run inside AWS, so you avoid the download–upload round trip that costs egress on both legs:

curl -X POST https://api.s3zipper.com/v1/zipstart \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"awsKey":"AKIA...","awsSecret":"...","awsBucket":"my-bucket",
       "awsRegion":"us-east-1","filePaths":["my-bucket/invoices/2026-10"],
       "zipFileName":"invoices-2026-10.zip"}'

Then fetch the signed URL from /v1/zipresult and share it. Because the archive lives back in S3, your egress is exactly one download per recipient, not one per file.

Rule of thumb

If your users routinely download more than a handful of related files, zip them. If they download one small compressed file at a time, compression will not save much — measure before you optimise.

Try it on your own bucket

Create a free account and zip S3 files on the fly — no downloads, no local disk.

Create free account API docs

← All posts