Skip to content

Cloudflare R2

Key idea:

Cloudflare R2 — S3-compatible object storage with zero egress fees (AWS S3 charges ~$0.09/GB outbound). Storage price: $0.015/GB/mo. Access: S3 API (aws-cli, rclone, boto3 work unchanged). Integrations: Workers for on-the-fly image transforms, Hyperdrive for DB caching. Used by: Shopify, Notion, Superhuman.

Below: details, example, related terms, FAQ.

Try it now — free →

Details

  • S3 API 100 % compatible: aws-cli, boto3, rclone, mc — no changes
  • Pricing: $0.015/GB storage, $0 egress, $4.50 per million Class A operations (PUT/POST/LIST)
  • Custom domain + HTTP/3: attach an R2 bucket to your own domain directly
  • Workers integration: fetch() an R2 object → transform → return — zero network hop
  • Multipart upload up to 5 TB/object, 11 9's regional durability

Example

# aws-cli config for R2
$ aws configure --profile r2
AWS Access Key ID: <R2_KEY>
AWS Secret: <R2_SECRET>
Default region: auto

# Upload
$ aws s3 cp file.zip s3://my-bucket/ \
    --endpoint-url https://<ACCOUNT>.r2.cloudflarestorage.com \
    --profile r2

Related

Learn more

Frequently Asked Questions

When is R2 cheaper than S3?

When egress > 10 % of storage cost (image hosting, video, static sites). For rarely-read archival — S3 Glacier is cheaper.

Minimum retention?

None. Unlike S3 Glacier, deletion is free and instant.

Do I need Workers?

No, R2 works standalone via S3 API. Workers are a bonus for transforms/caching.