Weekendstack

Blog

Cloudflare R2 vs S3: The Best File Storage for a SaaS (2026)

July 21, 2026 ยท 5 min read

Cloudflare R2 vs S3 for a SaaS? For most apps, R2 wins on cost because it charges $0 for egress. AWS S3 charges about $0.09/GB to serve data out to the internet; Cloudflare R2 charges nothing, with no threshold. R2 storage is also cheaper ($0.015/GB vs S3's $0.023/GB). S3 still wins for deep AWS-native setups and cold archival tiers โ€” but if your SaaS serves files, images, or downloads to users, R2 is usually the cheaper, simpler choice. It's why Weekendstack ships R2 wired.

Egress is the whole game

Storage costs are similar across providers; what quietly wrecks a bill is egressโ€” the fee to send data out to your users. On S3 that's ~$0.09/GB after a small free tier. On a workload serving 10 TB/month, that's roughly a $900/month difference versus R2's $0 egress โ€” every month, forever. For any app with images, video, user uploads, or downloads, egress dominates, and R2's zero-egress model can be many times cheaper.

When S3 still makes sense

S3 remains ahead if you're deep in AWS (Lambda, tiered storage classes, Object Lambda), or you need cold archival storage where egress is rare. Its ecosystem and integrations are genuinely more mature. If you're not already living in AWS, that maturity mostly buys complexity you don't need yet.

The practical setup for a SaaS

R2 is S3-compatible, so the same SDKs and presigned-URL patterns work. The secure pattern: your server signs a short-lived upload URL, the browser uploads bytes directlyto storage (never proxied through your server), and object keys are scoped per user. That's exactly how Weekendstack does it โ€” presigned PUTs, keys scoped to the authenticated user, no bytes through your API โ€” so uploads are cheap, fast, and safe by default.

Don't want to wire storage, signing, and access scoping by hand? It ships done in Weekendstack. See also the boilerplate comparison.

Frequently asked

Is Cloudflare R2 cheaper than S3?
Usually yes for apps that serve data to users. R2 charges $0 for egress (vs ~$0.09/GB on S3) and less for storage ($0.015 vs $0.023/GB). For heavy-bandwidth workloads R2 can be many times cheaper; the savings come mostly from egress.
Is R2 compatible with S3?
Yes. R2 is S3-compatible, so the same SDKs, tools, and presigned-URL patterns work with minimal changes. You can often point existing S3 code at R2 by swapping the endpoint and credentials.
When should I still use S3 instead of R2?
When you're deeply invested in AWS (Lambda, storage tiers, Object Lambda) or need cold archival storage where egress rarely happens. S3's ecosystem is more mature; if you're not already in AWS, that maturity mostly adds complexity.
What's the safe way to handle file uploads in a SaaS?
Have your server issue a short-lived presigned upload URL, let the browser upload directly to storage (not through your server), and scope object keys to the authenticated user. Weekendstack ships exactly this pattern on R2.

Build yours this weekend

Weekendstack is the production-ready codebase plus the prompt pack that makes your AI coding agent ship real features instead of guessing.

See pricing