Cloudflare R2 vs AWS S3 in 2026: Zero Egress Math, Real Pricing, and When to Actually Switch

Last updated: May 2026

The single biggest difference between Cloudflare R2 and AWS S3 is egress pricing — R2 charges $0 per GB egress; S3 charges $0.09/GB for the first 10 TB. At 10 TB of monthly egress, that's $0 vs ~$891. Storage cost is roughly comparable: R2 $0.015/GB vs S3 $0.023/GB. R2 implements the S3 API, so most apps can swap by changing the endpoint. This guide breaks down the real pricing math at multiple volumes, the S3 features R2 doesn't support, when Backblaze B2 or Wasabi might be a better fit, and the actual migration path.

For other infrastructure choices, see S3 Alternatives and Cheap Dedicated Server in 2026.

R2 vs S3 at a glance

AspectCloudflare R2AWS S3
Storage / GB / month$0.015$0.023
Egress / GB$0$0.09 (first 10 TB)
Class A operations (write) / 1M$4.50$5.00
Class B operations (read) / 1M$0.36$0.40
Free tier10 GB storage + 1M Class A ops + 10M Class B ops monthly5 GB + 20K reads + 2K writes (12 months only)
API compatibilityS3-compatible (core)S3 reference
RegionsGlobal with auto routingPer-region buckets
Object Lock / Intelligent-TieringNoYes
Deep AWS integrationNoYes (Lambda, RDS, etc.)

The egress math — where R2 wins big

A typical SaaS app or media-heavy site:

WorkloadS3 monthly costR2 monthly cost
100 GB stored + 1 TB egress$2.30 + $90 = $92$1.50 + $0 = $1.50
1 TB stored + 10 TB egress$23 + $891 = $914$15 + $0 = $15
10 TB stored + 50 TB egress$230 + $4,455 = $4,685$150 + $0 = $150
100 TB stored + 100 TB egress$2,300 + $9,000 = $11,300$1,500 + $0 = $1,500

These numbers don't include request operations (Class A / Class B) which run a few dollars/month at typical SaaS scale. But the headline is clear: for any workload where egress > 30% of S3 spend, R2 saves 70-95%.

When R2 is the obvious switch

  • Media CDN. Images, video thumbnails, downloads served at scale.
  • AI / ML training data. Datasets read repeatedly by cloud GPUs (RunPod, Lambda Labs).
  • Static site assets. JavaScript bundles, fonts, fonts served to many users.
  • File downloads. App binaries, document exports, user-generated downloads.
  • Public datasets. Where bandwidth, not storage, is the main cost.

When S3 is still the right call

  • Deep AWS integration. Lambda triggers on S3 objects, Glue catalog over S3 buckets, Athena over Parquet on S3, SageMaker reading from S3. R2 can be integrated but with more glue code.
  • Object Lock (compliance). Write-Once-Read-Many for SEC 17a-4, healthcare records, legal hold. S3 has it; R2 does not.
  • Intelligent-Tiering. Automatic class transitions for cost optimization on infrequently-accessed data. S3-only.
  • S3 Batch Operations. Run an operation across billions of objects. S3-only.
  • Cross-region replication with low latency. S3 has mature region-to-region replication; R2 has global distribution but different mental model.
  • Enterprise procurement / AWS contracts. If you have an AWS Enterprise Discount Program (EDP) commit, that may shift the math.

R2 API compatibility — what works, what doesn't

Works:

  • All bucket operations (create, delete, list).
  • All object operations (PUT, GET, DELETE, HEAD).
  • Multipart uploads.
  • Presigned URLs (S3 SDK, native S3 signing).
  • Lifecycle rules (object expiration).
  • CORS configuration.
  • Custom domains via Cloudflare DNS.
  • Public buckets via r2.dev or your own domain.

Does not work:

  • Object Lock (compliance immutability).
  • Intelligent-Tiering automatic class transitions.
  • S3 Batch Operations.
  • Inventory reports.
  • S3 Glacier / Deep Archive tiers.
  • Some advanced SSE / KMS configurations.

For typical SaaS web app use (user uploads, images, generated documents, exports), R2 is a clean drop-in. For regulated workloads or advanced data lake patterns, check the unsupported list before committing.

Backblaze B2 — the cheapest backup play

Backblaze B2 storage is $0.005-$0.006/GB/month (cheapest in the market). When paired with Cloudflare, egress between B2 and Cloudflare is free.

The B2 sweet spot: bulk backups, archival, infrequently-accessed cold storage. B2's per-request pricing is higher than R2 — so for hot storage with many small requests, R2 ends up cheaper end-to-end. For long-term backup vault with occasional reads, B2 is the best play.

Wasabi — flat-rate with a catch

Wasabi storage is $0.0099/GB/month with no egress charges. The catch: a "reasonable use policy" caps monthly egress at your stored volume. If you store 1 TB and want to egress 5 TB monthly, Wasabi will throttle or charge you.

Fit: archive / backup workloads where egress < stored volume monthly. Not fit: media CDN where egress is 10x stored.

The migration path

If you decide to move from S3 to R2:

  1. Audit current costs. Get the breakdown — what % of your S3 bill is egress?
  2. Provision an R2 bucket in your Cloudflare account. Generate API tokens.
  3. Dual-write phase. Update upload code to write to both S3 and R2. Run for 1-2 weeks.
  4. Migrate existing data. Use Cloudflare's free Super Slurper tool for one-time migration, or rclone / awscli for manual control.
  5. Switch reads. Update the URL signing / fetch code to use R2. Validate via A/B or canary deploy.
  6. Decommission S3. After 2-4 weeks of clean R2 reads, delete from S3.

Most apps complete migration in a single engineering week. The savings are immediate.

R2's free tier

  • 10 GB storage / month forever.
  • 1 million Class A operations / month forever.
  • 10 million Class B operations / month forever.
  • Zero egress always.

For side projects and prototypes, R2's free tier outlasts S3's 12-month free trial easily. Most personal apps never pay anything.

Combined patterns

The smartest 2026 storage architectures combine providers:

  • Hot serving: R2 for media and static assets (zero egress).
  • Cold archive: Backblaze B2 for backups (cheapest storage).
  • Compliance: S3 with Object Lock for regulated copies.
  • Cross-cloud CDN: R2 for global, AWS regions for AWS-locked services.

R2 doesn't replace S3 for every workload — it replaces the egress-heavy half of most workloads, which is usually 60-80% of the cost.

Common mistakes

  • Migrating before measuring. Audit egress first. If it's 5% of your S3 bill, savings are small.
  • Treating R2 as 100% S3-compatible. Check the unsupported features list before committing if you use Object Lock, Glacier, or advanced lifecycle.
  • Forgetting Cloudflare lock-in considerations. R2 is great, but your data is now tied to Cloudflare. If you ever want to leave, plan the exit.
  • Skipping the dual-write phase. Big bang migrations break things. Run both for a week.
  • Underestimating multipart-upload edge cases. R2's multipart-upload behavior differs slightly from S3 in edge cases. Test your specific upload flow before cutting over.

enjoyed this?

Follow me for more on AI agents, dev tools, and building with LLMs.

X / Twitter LinkedIn GitHub
← Back to blog