cloudflare-r2
Cloudflare R2
S3-compatible object storage with zero egress fees, built on Cloudflare's global network.
When to Use
- Storing user uploads, media files, backups, or static assets.
- Replacing AWS S3 to eliminate egress costs for read-heavy workloads.
- Serving files at the edge via Workers or public bucket access.
- Building multi-cloud storage that avoids vendor lock-in (S3 API compatible).
- Storing ML model artifacts, training data, or inference results.
Object and public-access scope
Confirm account, bucket, exact keys/prefix and overwrite/delete authority before writes or lifecycle changes. R2 supports a subset of S3 behavior; verify CLI subcommands/location hints against the installed Wrangler version. Zero egress does not mean zero storage/request/infrequent-access costs. The GET fragment intentionally serves only already-approved public assets; never attach it to private uploads. Signed URLs are bearer capabilities: authorize the caller and object, encode key path segments, set explicit short expiry and method, return privately with no-store, and never print/share them in logs. CORS does not authenticate callers. See presigned URL scope.