AWS S3 vs Cloudflare R2
The original object storage vs the zero-egress upstart. R2 is S3-compatible and doesn't charge you to read your own data.
The short answer
Cloudflare R2 over AWS S3 for most cases. Zero egress fees.
- Pick AWS S3 if in AWS, need advanced features like S3 Select or Glacier, or have compliance requirements that mandate AWS
- Pick Cloudflare R2 if serve files to users and don't want to pay egress fees. Most startups and indie projects should default to R2
- Also consider: Backblaze B2 is another cheap option with Cloudflare bandwidth alliance (free egress through CF).
β Nice Pick, opinionated tool recommendations
The Egress Tax
AWS charges you to download your own data. S3 egress is $0.09/GB. Serve 1TB of images to users? That's $90/month just in bandwidth. Every month. Forever.
Cloudflare R2 charges $0/GB for egress. Zero. The same 1TB costs nothing to serve. This changes the economics of serving files entirely.
S3 Compatibility
R2 speaks the S3 API. Your existing S3 SDKs, tools, and libraries work with R2 by changing the endpoint URL. Migration is literally changing a config value.
Not everything is supported yet β no lifecycle rules as advanced as S3, no S3 Select, no Glacier equivalent. But for standard put/get/list operations, it's drop-in compatible.
When S3 Still Wins
S3 has 18 years of battle-testing, every compliance certification imaginable, and deep integration with the entire AWS ecosystem. Lambda triggers, EventBridge, Athena queries, Glacier archival.
If you're deep in AWS and need those integrations, S3 is the obvious choice. R2 is a storage bucket, not an ecosystem.
Zero-Egress Pricing: The Real Monthly Math
Let's talk numbers. If you serve 100TB of data per month from AWS S3, you're paying $7,700 in egress fees alone (at $0.077/GB after the first 100GB free). Cloudflare R2? $0. That's $92,400 per year saved. Even with S3's cheaper storage ($0.023/GB vs R2's $0.015/GB for the first 500TB), the egress tax kills you. For a typical media site with 50TB stored and 200TB egress monthly: S3 costs ~$3,850 (storage) + $15,400 (egress) = $19,250. R2: $750 (storage) + $0 egress = $750. That's 96% cheaper. And R2's 10GB free egress per day? It covers small apps entirely. The only catch: if you have <1TB egress, the difference is negligible. But for anything with traffic, R2 wins by a landslide.
Performance: Edge vs. Regional β Whoβs Faster?
AWS S3 gives you low latency within a single region. If your users are in us-east-1, you get ~5ms access. But if your audience is global, you need CloudFront (additional cost) and still get regional bottlenecks. Cloudflare R2 is built on the edge: data is served from 330+ locations worldwide. For a user in Tokyo accessing R2, latency is ~20ms; S3 from us-east-1 is 150ms. Even with S3 in ap-northeast-1, you're at 10ms but paying 3x storage cost. R2's edge cache means first-byte times under 50ms globally. The tradeoff: if your app is single-region and latency-sensitive (e.g., high-frequency trading), S3's direct access wins. But for any global audience, R2's edge network is faster and cheaper. Plus, R2 integrates with Workers for compute at the edge, reducing round trips.
Ecosystem Lock-In: AWS vs. Cloudflareβs Playground
AWS S3 isn't just storage; it's the hub for Lambda, Athena, Redshift, Glue, and SageMaker. If you're running a data lake with Athena queries scanning terabytes, S3's integration is seamless. R2? You get Workers (serverless compute) and D1 (database), but no Athena or Redshift. You can still use R2 with external compute (EC2, Lambda via S3-compatible SDK), but it's not native. For example, querying R2 with Athena requires a gateway (like MinIO) β adds latency. If you rely on AWS-native pipelines (e.g., S3 Event Notifications β Lambda β SQS), R2's event notifications are limited (Workers can listen, but no SQS). So, if your stack is AWS-heavy, S3 wins. But if you're building a new, edge-focused app with Workers, R2 is the pick. Don't fool yourself: R2 is for the Cloudflare ecosystem, S3 for AWS. Choose your prison.
Quick Comparison
| Factor | AWS S3 | Cloudflare R2 |
|---|---|---|
| Egress Cost | $0.09/GB | $0/GB |
| Storage Cost | $0.023/GB/mo | $0.015/GB/mo |
| S3 API Compatible | Native | Yes |
| Ecosystem | Massive (AWS) | Workers integration |
| Compliance | Every cert exists | SOC 2, GDPR |
| Durability | 11 nines | 11 nines |
| Free Tier | 5GB/12mo | 10GB forever |
The Verdict
Use AWS S3 if: You're in AWS, need advanced features like S3 Select or Glacier, or have compliance requirements that mandate AWS.
Use Cloudflare R2 if: You serve files to users and don't want to pay egress fees. Most startups and indie projects should default to R2.
Consider: Backblaze B2 is another cheap option with Cloudflare bandwidth alliance (free egress through CF).
Zero egress fees. That's it. That's the reason. If you're serving files to users, R2 saves you a fortune. S3 compatibility means migration is trivial. Unless you need S3's advanced features, R2 is the obvious choice.
Related Comparisons
Disagree? nice@nicepick.dev