Cloudflare R2 vs AWS S3 in 2026: Zero-Egress Finally Wins?

I'd pick Cloudflare R2 for any media-heavy or globally-distributed app where egress bills are killing your margin, and AWS S3 when you need the deepest ecosystem integration money can buy. The fault line is almost always cost vs. capability breadth.

Part of theDev Tools & AI Workflow series
Cloudflare R2 vs AWS S3 in 2026: Zero-Egress Finally Wins?

I'd pick Cloudflare R2 for any project where egress fees are a line item your CFO has noticed, and AWS S3 when your team is already running half of production on AWS and switching costs outweigh storage savings. I ran both in parallel for roughly four months across a mid-sized video-processing SaaS — about 4 TB of assets, 80 million object reads per month, 12 engineers — and the cost difference wasn't subtle. Our S3 egress bill alone was running $340/month before we migrated the read path to R2. After the migration: $0 in egress. The tradeoff was two weeks of integration re-wiring for Lambda triggers and a handful of lifecycle rules we had to rebuild in Cloudflare Workers. Here's where each actually wins.

---

The Headline Differences

Cloudflare R2 vs AWS S3: Full Feature Comparison (2026)
DimensionCloudflare R2AWS S3
Storage price (hot)$0.015/GB/month$0.023/GB/month (Standard)
Egress fees$0 (zero egress)$0.09/GB after 100 GB free
Free tier10 GB storage, 1M Class A ops5 GB storage, 20K GET, 2K PUT
S3-compatible APIYes (full S3 API support)Native (original)
Global edge locations300+ PoPs (Cloudflare network)33 regions (AWS)
Event notificationsR2 → Workers, Queues (limited)S3 → Lambda, SNS, SQS, EventBridge
Storage classes (tiering)Single class only (no archival)Standard, IA, Glacier, Intelligent-Tiering
Object lifecycle rulesBasic (TTL-based deletion)Advanced (tiering, transitions, replication)
Max object size5 TB (multipart)5 TB (multipart)
Multipart uploadYesYes
Presigned URLsYesYes
VersioningYes (GA 2024)Yes (mature, full history)
Cross-region replicationNo (single global namespace)Yes (CRR & SRR)
CORS supportYesYes
Audit loggingVia Logpush (limited detail)AWS CloudTrail (granular, mature)
Best fitMedia apps, SaaS, high-egressEnterprise, data pipelines, deep AWS stack

The core split between Cloudflare R2 and AWS S3 isn't about which service stores bits more reliably — both offer 11 nines of durability and have production track records measured in years. The real fault line is egress economics vs. ecosystem depth. Here's how the most important dimensions stack up at a glance:

  • Egress fees: R2 charges $0. S3 charges $0.09/GB after the first 100 GB/month free. On a 10 TB egress workload, that's a $921/month delta — every month, forever.
  • Storage price: R2 is $0.015/GB/month vs. S3 Standard at $0.023/GB/month. The gap matters at scale but is secondary to egress.
  • API compatibility: R2 fully implements the S3 API, which means migration tooling (rclone, aws-cli with endpoint override, SDK endpoint config) works without code rewrites.
  • Storage tiering: S3 has Standard, Infrequent Access, Glacier Instant Retrieval, Glacier Flexible Retrieval, Glacier Deep Archive, and Intelligent-Tiering. R2 has one tier. If archival is your workload, S3 wins decisively.
  • Ecosystem integrations: S3 is the native trigger for Lambda, the input for Athena, a first-class citizen in SageMaker, and wired into hundreds of AWS managed services. R2's event ecosystem is Workers and Queues — powerful but narrow.
  • Edge delivery model: R2 data is served from Cloudflare's 300+ PoP network natively. S3 requires CloudFront as a separate CDN layer (and yes, CloudFront egress costs money).
  • Operational maturity: S3 launched in 2006. R2 went GA in 2022. The gap in battle-testing, tooling depth, and documentation breadth is real.

Neither of these services is objectively "better." They optimize for different constraints. The question is which constraint is yours.

---

→ Related: Cursor vs Windsurf in 2026: Which AI Code Editor Should You Use?

When I'd Pick Cloudflare R2

I switched our video thumbnail and processed-asset pipeline to R2 in Q3 2024 and haven't looked back for that workload. Here's the specific profile where R2 is the obvious choice:

You have high read/egress volume. This is the R2 killer app. If your users are pulling assets — images, videos, PDFs, generated files — directly from object storage (or through a CDN that charges for origin egress), you're paying S3's $0.09/GB tax every single month. At 5 TB of monthly egress, that's $450/month purely in data transfer. R2 eliminates that line item entirely. For a bootstrapped indie developer or a Series A startup watching burn, this is not a rounding error.

You're already on Cloudflare for CDN or DNS. If your traffic runs through Cloudflare anyway, R2 becomes a near-zero-latency storage backend with no additional hop. Cloudflare Workers can read and write R2 objects in the same request with no egress charge, which makes patterns like "transform-on-read" (resize images, transcode, sign URLs) essentially free to run at edge. This architecture is genuinely novel compared to what you'd build on S3 + Lambda + CloudFront.

Your storage workload is simple. R2 doesn't have Glacier, Intelligent-Tiering, or S3 Batch Operations. If your use case is "store files, serve files, maybe delete them after 90 days," that's fine — R2's lifecycle rules handle TTL-based deletion. But if you need to archive 50 TB of logs to cold storage at $0.004/GB/month, R2 has no equivalent. Bunny.net vs Cloudflare in 2026 covers a related tradeoff for CDN-adjacent storage decisions worth reading if you're evaluating the full Cloudflare edge stack.

You want to avoid AWS lock-in. R2's full S3 API compatibility means you can write code that switches between the two via a single endpoint config change. Teams that worry about AWS dependency — whether for cost, compliance, or negotiating leverage — find R2 a credible hedge.

The cost is: you give up S3's deep event integrations, cross-region replication, storage class tiering, and the years of CloudTrail audit maturity. You also give up the implicit trust enterprises place in "it's on AWS" during vendor security reviews. Those aren't trivial. But for a read-heavy media app, a SaaS serving user uploads, or any greenfield project not already entrenched in AWS, R2 is the financially rational default in 2026.

---

When I'd Pick AWS S3

I would not rip S3 out of an AWS-native data pipeline. Not because R2 is worse on paper, but because the migration cost is measured in engineering weeks, not dollars — and the ecosystem depth you'd lose is quietly load-bearing.

You need storage class tiering. If you're keeping data for compliance (7-year retention mandates are common in fintech and healthcare) or running cold analytics on rarely-accessed data, S3's storage class hierarchy is irreplaceable. Glacier Deep Archive at $0.00099/GB/month is one of the cheapest storage options in the industry. R2 has no answer here. Storing 100 TB of compliance archives in S3 Glacier Deep Archive costs about $99/month. The same data in R2 at $0.015/GB costs $1,500/month. That math makes S3 the only rational choice for cold archival at scale.

Your pipeline depends on S3 event triggers. S3 → Lambda is the most common serverless event pattern in AWS. S3 → SNS → SQS fan-out, S3 → EventBridge → Step Functions — these are mature, well-documented, and deeply tested patterns. If you're processing uploads with Lambda (resizing, OCR, transcription, ML inference), the S3 trigger latency is sub-second and the retry semantics are well-understood. R2 can fire Workers on write, but the ecosystem of downstream services is far thinner. Rebuilding a five-service S3 event fan-out in R2 + Workers + Queues is doable, but it's a non-trivial rewrite.

You're running data analytics on S3. Amazon Athena queries S3 directly using SQL over Parquet, ORC, or CSV. Amazon Redshift Spectrum does the same. AWS Glue crawls S3 to build data catalogs. If your data team runs even one SQL query on stored data per week, S3 is the center of that universe. R2 has no equivalent analytical query layer in 2026.

Your security team requires AWS-native compliance tooling. CloudTrail gives you per-API-call audit logs, IAM-based access policies with extraordinary granularity, S3 Object Lock for WORM compliance, and Macie for PII detection. R2's access controls and logging are improving but are still a generation behind. For SOC 2 Type II audits or HIPAA workloads, S3's compliance posture is proven and R2's is still accumulating track record.

You have more than 10 engineers on AWS. The switching cost scales with team size. A 15-person engineering team on AWS has S3 embedded in their mental model, their runbooks, their Terraform modules, and their incident response playbooks. The productivity cost of switching is real and often exceeds 12 months of egress savings. The Cloudflare Workers V8 isolates architecture is compelling for edge compute, but it doesn't erase the ecosystem switching cost on the storage side.

The cost is: you pay egress fees. On a read-heavy workload, that can genuinely be your largest AWS line item. Accept that tradeoff consciously or build a CloudFront distribution (which has its own egress costs but is typically cheaper than direct S3 egress for high-volume workloads).

---

Cost Analysis: The Real Numbers

Let me make the cost comparison concrete rather than abstract.

Scenario A: Media SaaS, 4 TB stored, 10 TB egress/month, 50M GET requests

| Cost Component | Cloudflare R2 | AWS S3 |
|---|---|---|
| Storage (4 TB) | $61.44/mo | $94.21/mo |
| Egress (10 TB) | $0 | $921.60/mo |
| GET requests (50M) | $2.15/mo | $22.00/mo |
| Total | ~$64/mo | ~$1,038/mo |

The delta is $974/month, or about $11,700/year. For a bootstrapped SaaS, that's a meaningful portion of a junior engineer's salary. R2 wins this scenario conclusively.

Scenario B: Compliance archive, 100 TB cold data, 50 GB egress/month

| Cost Component | Cloudflare R2 | AWS S3 Glacier Deep Archive |
|---|---|---|
| Storage (100 TB) | $1,536/mo | $99/mo |
| Egress (50 GB) | $0 | ~$4.50/mo |
| Total | ~$1,536/mo | ~$104/mo |

S3 Glacier Deep Archive wins by a factor of 15x here. R2's single storage tier is a genuine architectural limitation for cold data workloads.

Scenario C: Developer side project, 50 GB stored, 200 GB egress/month

R2 free tier covers 10 GB storage and 1M Class A operations. For 50 GB at $0.015/GB that's $0.60/month in storage, $0 in egress. S3 free tier covers 5 GB storage; beyond that, 45 GB × $0.023 = $1.04 storage + 100 GB free egress then 100 GB × $0.09 = $9 egress. Total S3: ~$10/month. R2: ~$0.60/month.

For indie developers, R2's pricing model is genuinely generous. The Cloudflare Workers vs Vercel Functions comparison has a similar cost story on the compute side.

---

Performance and Latency

Both services offer similar raw throughput for large object transfers — expect 1–5 Gbps per connection depending on client proximity. The more interesting performance question is first-byte latency for small object reads, which is what most web applications actually care about.

S3 with no CDN: expect 20–80ms first-byte latency depending on your region and the client's geography. With CloudFront, cached responses drop to single-digit milliseconds but uncached origin fetches still hit S3 in the origin region.

R2 with Cloudflare CDN/Workers: because R2 buckets are inherently part of the Cloudflare network, Workers can serve R2 content from the nearest PoP without a separate origin request for cached content. For globally distributed user bases, this is a material advantage — you're not choosing "serve from us-east-1 and pay CloudFront egress," you're serving from whichever of 300+ PoPs is closest to the user.

For write latency (PUT operations), both services are regionally bounded and perform similarly. S3 has the advantage of more fine-grained region selection (33 AWS regions vs. R2's single global namespace), which matters if data residency regulations require you to physically locate data in a specific country. R2 added jurisdictional restrictions in 2024 allowing EU-only or US-only data residency, which addresses the most common compliance cases.

Multipart upload performance is comparable. Both support 5 TB maximum objects via multipart upload. Both support byte-range GETs for streaming large files. Neither has a meaningful edge here.

---

Ecosystem and Developer Experience

This is where S3's 18-year head start is most visible. The AWS SDK covers every major language with mature, well-tested clients. S3 integrations exist in virtually every data tool, backup solution, CMS, and framework. Terraform's AWS provider has hundreds of S3-related resources. The sheer volume of Stack Overflow answers, blog posts, and runbooks for S3 is irreplaceable institutional knowledge.

R2's S3 API compatibility is a smart strategic choice — it means you can use the AWS SDK pointed at R2's endpoint (https://<account-id>.r2.cloudflarestorage.com) without rewriting application code. Tools like rclone work against R2 out of the box. This dramatically lowers the migration bar for simple storage workloads.

Where R2's ecosystem genuinely shines is its integration with the rest of the Cloudflare Developer Platform. Pairing R2 with Workers, KV, D1 (SQLite at edge), and Queues creates a coherent serverless stack that's architecturally elegant for certain application patterns. If you're building AI-adjacent applications at the edge — something increasingly common given the growth of on-device inference and edge AI — this stack becomes compelling. The open-source AI projects worth watching in 2026 have started adopting edge storage patterns that favor R2's model.

S3's weakness in developer experience is its pricing complexity. Working out exactly what your bill will be requires understanding storage class pricing, request pricing, data transfer pricing, replication pricing, and retrieval fees for Glacier tiers. R2's pricing page fits on a postcard. That simplicity has real operational value — no more surprise bills from misconfigured lifecycle rules.

---

Migration Effort and Operational Risk

Migrating from S3 to R2 for a simple read/write workload is genuinely straightforward — change the endpoint in your SDK config, create R2 bucket credentials, run rclone or aws s3 sync with the endpoint override, update DNS if you're using custom domains. A competent engineer can migrate a straightforward workload in an afternoon.

The complexity multiplies with:
- Lambda event triggers: Rebuild as R2 → Workers (requires rewriting trigger logic, not just config changes)
- Lifecycle rules with storage class transitions: R2 only supports deletion; transitions need architectural redesign
- Cross-region replication: R2 has a single global namespace, so CRR destinations need to be rethought
- CloudTrail-dependent audit workflows: R2's Logpush is different in schema and completeness
- STS/IAM-based access: R2 uses API tokens, not IAM roles; service-account patterns differ

For teams considering the move, I'd recommend a strangler-fig approach: migrate new buckets to R2 first, keep existing S3 buckets for workloads with complex integrations, and evaluate migration of each S3 bucket independently based on its egress profile and integration complexity.

---

What I'd Use Today

Indie developer / side project: R2, no question. The free tier is more generous, egress is free, and the S3-compatible API means your code is portable. Start with R2 and you'll never pay an egress bill at side-project scale.

Early-stage startup (1-5 engineers, pre-product-market-fit): R2 for primary asset storage. Keep S3 only if you have a specific need (cold archival, existing Lambda triggers). The cost savings compound and you avoid the AWS ecosystem trap before you've committed to it. The roughly $11,700/year savings on a media-heavy workload funds meaningful engineering time.

Growth-stage startup (10-50 engineers, significant AWS footprint): Mixed. Migrate greenfield buckets and high-egress buckets to R2. Keep S3 for data pipeline storage (Athena, Glue, SageMaker), compliance archives, and buckets with complex Lambda trigger chains. Hybrid isn't a cop-out here — it's the economically rational answer.

Enterprise (100+ engineers, AWS as strategic vendor, compliance requirements): S3 as primary. R2 as a CDN-layer cache or for specific high-egress edge cases where the cost delta is large enough to justify a parallel stack. Enterprise security teams will be more comfortable with S3's audit and compliance tooling for another 2-3 years at minimum.

AI/ML workload builders: S3 for training data pipelines (SageMaker, Bedrock are tightly integrated). R2 for serving model outputs and generated assets at edge. This mirrors how a lot of the more sophisticated ML infrastructure teams I've spoken with are thinking about it heading into 2026.

---

Common Mistakes When Choosing Between Cloudflare R2 and AWS S3

Mistake 1: Forgetting to account for CloudFront costs when comparing S3 pricing. Most production S3 workloads aren't served naked from S3 — they go through CloudFront. CloudFront has its own data transfer costs ($0.0085–$0.085/GB depending on region and volume). The true "S3 for public reads" cost includes CloudFront. When people tell me "S3 is only $0.09/GB egress," they're usually already paying CloudFront on top of that for cache misses.

Mistake 2: Assuming R2's S3 API compatibility covers 100% of S3 features. It covers the core API well, but S3 Select, S3 Object Lock (WORM), S3 Intelligent-Tiering, and S3 Batch Operations have no R2 equivalents. If your application uses any of these, migration requires architectural changes, not just endpoint updates.

Mistake 3: Underestimating R2's maturity trajectory. R2 only went GA in September 2022. Some engineers dismiss it as "too new" for production. That was a reasonable concern in 2022; it's less defensible in 2026. R2 now handles significant production traffic from large Cloudflare customers, versioning is GA, and jurisdictional restrictions address the main compliance gap. Don't let 2022 skepticism drive a 2026 decision.

Mistake 4: Running the cost comparison only on storage GB, not on operations. R2 charges $4.50/million Class A operations (PUT, POST, DELETE) and $0.36/million Class B operations (GET). S3 charges $5/million PUT and $0.40/million GET. The difference is small but not zero. For workloads with extreme operation counts (millions of small-file writes), run the full cost model, not just the storage-GB comparison.

---

Where to Go Deeper

If this comparison surfaced questions about adjacent architectural decisions, here's where I'd read next:

The Cloudflare Workers vs Vercel Functions 2026 comparison is the natural companion to this article — once you've decided on R2 for storage, you'll want to evaluate whether Workers or another edge runtime makes sense for your compute layer. The edge storage + edge compute combination is where R2's architecture really differentiates.

If you're evaluating Cloudflare's full stack against alternatives, Bunny.net vs Cloudflare in 2026 covers the CDN-first perspective, which is relevant if your primary driver is media delivery cost rather than object storage API compatibility.

For deeper understanding of why Cloudflare's edge architecture works the way it does at a systems level — which informs how R2 integrates with Workers — Cloudflare Workers V8 Isolates explains the cold-start advantages that make Workers a credible trigger replacement for Lambda in many patterns.

For database layer decisions that often accompany storage architecture choices, PostgreSQL vs MySQL 2026 covers the relational side of the stack with the same opinionated verdict-first approach.

Official documentation worth bookmarking: Cloudflare R2 docs, AWS S3 pricing page, and rclone's S3-compatible configuration guide for migration tooling.

Continue reading

Cursor vs Windsurf in 2026: Which AI Code Editor Should You Use?

Cursor vs Windsurf in 2026: Which AI Code Editor Should You Use?

Cursor wins for power users and teams needing deep customization; Windsurf wins for solo developers who want a faster, more autonomous out-of-the-box experience. Here's the full breakdown.

Mac mini M4 vs M4 Pro 2026: Which One Actually Pays Off?

Mac mini M4 vs M4 Pro 2026: Which One Actually Pays Off?

I'd pick the M4 for solo developers and light local AI work under $600; I'd pick the M4 Pro the moment you're running 30B+ parameter models or need that second display for a real dev setup. The $300 price gap is real, but so is the memory ceiling.

TypeScript vs JavaScript 2026: Type Safety Finally Worth the Cost?

TypeScript vs JavaScript 2026: Type Safety Finally Worth the Cost?

I'd pick TypeScript for any team larger than two people shipping production APIs, and plain JavaScript for rapid solo prototypes where iteration speed beats correctness. Here's the fault line I hit running both on a real Node.js microservice for six months.

Frequently Asked Questions

Bunny vs Cloudflare: which is better for storage and CDN?

Cloudflare R2 wins for S3-compatible object storage with zero egress fees and deep Workers integration. Bunny.net wins on pure CDN price-performance for video and large media delivery, often undercutting Cloudflare on per-GB transfer costs at high volume. For object storage specifically, R2 is the stronger choice; for CDN-first media delivery, Bunny.net is worth a serious look.

Bunny.net vs Cloudflare: which should I use in 2026?

Use Cloudflare if you're building on the Cloudflare developer platform (Workers, R2, D1, KV) and want a unified edge stack. Use Bunny.net if your primary need is cheap, fast media delivery without the complexity of a full developer platform. Bunny.net's Stream product for video and its Edge Storage pricing are frequently cheaper than Cloudflare for pure CDN workloads at scale.

Bunny CDN vs Cloudflare: what are the key differences?

Bunny CDN is purpose-built for content delivery with simpler pricing (a flat per-GB rate starting around $0.005/GB). Cloudflare is a full security, networking, and developer platform where CDN is one component. Cloudflare's free tier, DDoS protection, and Workers ecosystem are unmatched. Bunny CDN typically wins on raw per-GB transfer cost for high-volume video and download workloads.

Cloudflare Workers V8 isolates: how do they affect R2 performance?

Cloudflare Workers use V8 isolates instead of containers, enabling sub-millisecond cold starts (under 5ms vs. 100–500ms for Lambda). This directly benefits R2 workloads: Workers can transform, sign, or proxy R2 objects on every request at edge with no cold-start penalty. For read-heavy R2 workloads with per-request logic (auth, image resizing, URL signing), the isolate model makes Workers a better trigger than Lambda.

Cloudflare v8 isolates vs AWS Lambda: which is faster for storage triggers?

V8 isolates win on cold start latency by roughly 100x. AWS Lambda cold starts range from 100ms to over 1 second for compiled runtimes; Cloudflare Workers cold starts are typically under 5ms. For storage event triggers (on upload, transform, notify), this matters for synchronous user-facing flows. Lambda wins on runtime limits (15 minutes vs. Workers' 30-second CPU limit) and ecosystem depth.

Cloudflare vs Vercel comparison 2026: does the storage choice affect the decision?

Yes. If you're on Vercel, you'll pair it with S3 or Vercel Blob (which is R2 under the hood, with a markup). If you're on Cloudflare Workers, R2 is the native storage layer with zero egress between compute and storage. Teams choosing Vercel for DX reasons often still use R2 directly to avoid Vercel Blob's premium pricing. The storage layer is a real factor in the Workers vs. Vercel platform decision.

Cite this article
Kunal Ganglani (2026, July 11). Cloudflare R2 vs AWS S3 in 2026: Zero-Egress Finally Wins?. Kunal Ganglani. Retrieved August 7, 2026, from https://www.kunalganglani.com/blog/cloudflare-r2-vs-aws-s3