Skip to content
Latchkey

S3 vs Cloudflare R2: Object Storage Choice

Amazon S3 is the industry-standard object store with the deepest ecosystem; Cloudflare R2 is S3-compatible storage with zero egress fees.

S3 is the most mature object store, with the widest feature set (lifecycle, replication, storage classes, deep AWS integration) and the largest ecosystem. R2 is S3-API-compatible, runs on Cloudflare's edge, and crucially charges no egress fees, making it compelling for bandwidth-heavy workloads and CDN-fronted assets. S3 favors features and AWS integration; R2 favors egress economics.

S3Cloudflare R2
Egress feesYesNone
APIS3 (native)S3-compatible
FeaturesDeepest (classes, lifecycle)Growing
EcosystemLargest (AWS)Cloudflare platform
Best forAWS-native, rich featuresEgress-heavy, CDN assets

Use case and cost

S3 suits AWS-native workloads needing advanced storage classes, lifecycle rules, and tight AWS integration. R2 suits bandwidth-heavy use (media, downloads, public assets) where egress dominates cost, and integrates with Cloudflare Workers and CDN. Its S3 compatibility eases migration of read/write code.

In CI and deploy

Both accept uploads via the S3 API from CI (artifacts, build outputs, static assets) using OIDC or scoped tokens. Either works from managed runners, where faster runners shorten artifact upload steps.

The verdict

AWS-native workloads needing rich storage features and integration: S3. Egress-heavy or CDN-fronted assets where bandwidth cost dominates: Cloudflare R2 (zero egress, S3-compatible). Many teams keep S3 for AWS-internal data and use R2 for public, high-egress assets.

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card