Object Storage: S3 API, Migration, Public Buckets, and Workers
What Cloudflare R2 is, how Sippy and Super Slurper migrate data, public bucket options, Workers bindings, and how to verify setup.
This page summarizes Cloudflare’s documentation for Cloudflare R2: S3-compatible object storage marketed with no egress bandwidth fees for typical use, strong consistency per object, and integration with Cloudflare Workers.
Cloudflare R2 is an S3-compatible object storage service with no egress fees, built on Cloudflare’s global network. It is strongly consistent and designed for high data durability.
— Cloudflare, How R2 works
R2 fits storing unstructured data—web assets, media, backups, user-generated content, and large batch outputs—when you want S3-style APIs without paying egress on every download. Objects live in buckets (private by default); you reach them via the Workers API, the S3-compatible API, or public buckets on a custom domain or r2.dev.
R2 object storage: what you get compared with typical cloud buckets
Section titled “R2 object storage: what you get compared with typical cloud buckets”R2 is S3-compatible blob storage aimed at large objects, infrequent-to-frequent access patterns, and strong consistency per object.
R2 is S3-compatible blob storage that allows developers to store large amounts of unstructured data without egress fees associated with typical cloud storage services.
— Cloudflare, Choose a data or storage product
| Concern | What Cloudflare documents |
|---|---|
| Egress | No costly egress bandwidth fees associated with typical cloud storage (product positioning across R2 overview and multi-cloud reference) |
| Consistency | Described as strongly consistent for API operations directly against the bucket (consistency model) |
| Durability | 99.999999999% (eleven 9s) annual durability design (durability) |
| Encryption | AES-256 at rest (automatic); TLS in transit (data security) |
Objects are files identified by a key (for example images/photo.png) (Objects).
How R2 serves requests: Gateway, metadata, and cache
Section titled “How R2 serves requests: Gateway, metadata, and cache”API traffic enters an R2 Gateway on Workers, coordinates metadata (Durable Objects) for strong consistency, uses a tiered read cache, and persists encrypted payload on distributed storage (How R2 works — Architecture).
Supported client surfaces include:
- Workers API and Workers API reference
- S3 API at
https://<ACCOUNT_ID>.r2.cloudflarestorage.com(S3 API compatibility) - Dashboard and Wrangler
External services and Workers can use the S3 API for portability; Worker–R2 interaction via bindings avoids egress fees in the documented multi-cloud pattern (egress-free multi-cloud).
S3 API compatibility: migrating tools and code with minimal changes
Section titled “S3 API compatibility: migrating tools and code with minimal changes”R2 implements the S3 API so existing SDKs, CLI workflows, and apps (for example Mastodon with S3_ENABLED) can target R2 with endpoint and credential changes—not a new object model.
R2 implements the S3 API to allow users and their applications to migrate with ease.
— Cloudflare, S3 API compatibility
Practical notes from the cluster:
- Some S3 features differ or are in progress; the S3 API compatibility page lists operation status.
- R2 does not support S3 ACL headers the way some apps send them—for Mastodon, leave
S3_PERMISSIONempty (Mastodon tutorial). - Presigned URLs suit anonymous or direct client uploads without org-wide Cloudflare Access (Protect an R2 Bucket with Cloudflare Access).
- API tokens scope access at Account or Bucket resource level.
Authenticate with bucket scoped tokens or S3-compatible access keys as described in Authentication and Sippy/Super Slurper setup pages.
Workers and R2: serverless file APIs without routing all bytes through your origin
Section titled “Workers and R2: serverless file APIs without routing all bytes through your origin”The common pattern is a Worker bound to a bucket: upload, download, auth, and caching at the edge. The learning path episode describes securing uploads with tokens, Wrangler config, Smart Tiered Cache, and deploy (Accessing your bucket from Cloudflare Workers). Deeper walkthrough: Securely access and upload assets with Cloudflare R2.
Get started with R2 lists Workers API as the primary programmatic path for many greenfield apps.
Consistency vs cache: Reads through Worker bindings or S3 API hit the bucket directly and follow R2’s strong consistency model. If you serve objects through a custom domain with caching, stale content can appear until TTL expiry or purge—for example deleted objects still cached, or 404s cached after a new upload (consistency — Caching).
Public buckets: custom domain vs r2.dev development URL
Section titled “Public buckets: custom domain vs r2.dev development URL”Buckets are never public by default (Create buckets — Notes). To expose objects over HTTP you enable public buckets in one of two ways (Public buckets):
| Method | Best for | Limits in docs |
|---|---|---|
| Custom domain you control | Production; WAF, caching, Access, analytics | Zone must be in the same account; connect under bucket Settings → Custom Domains |
r2.dev managed subdomain |
Development and testing | Rate limited; not for production (Limits, Error 429) |
The development URL (r2.dev) does not support caching, WAF, or bot management. You must use a Custom Domain for these features.
— Cloudflare, Enable cache in an R2 bucket
To serve through Cloudflare’s cache, attach a custom domain so requests flow User → WAF → Cache → R2 (Enable cache in an R2 bucket, WAF and Snippets).
Access control on public URLs:
- Team-only buckets: Cloudflare Access—create the Access application before connecting a custom domain, or the bucket becomes public by default.
- If you use WAF or Access, disable public
r2.devaccess or the bucket stays reachable on that URL (Public buckets — Access control).
Data migration to R2: Sippy vs Super Slurper
Section titled “Data migration to R2: Sippy vs Super Slurper”Cloudflare offers two first-party migration tools (Data migration):
| Tool | Behavior | When to use (per docs) |
|---|---|---|
| Super Slurper | One-time bulk copy; preserves custom metadata; does not delete source | Comprehensive transfer; objects up to 1 TB per object (larger skipped) |
| Sippy | On GetObject (and similar read paths), serve from R2 or backfill from source | Gradual migration; avoid upfront egress; active buckets |
Sippy copies objects to R2 as your application requests them, so you can start serving data from R2 without first moving your entire dataset or paying migration-specific egress fees.
— Cloudflare, Sippy changelog
Sippy flow: Request hits R2; if missing, object returns from source and copies to R2; later requests use R2 (On-demand migration architecture, Sippy — How it works). PutObject / DeleteObject affect R2 only; deletes in R2 alone can cause Sippy to repopulate from source on the next miss (Sippy — R2 API interactions).
Enable Sippy via dashboard (Settings → On Demand Migration), Wrangler, or API:
npx wrangler r2 bucket sippy enable "<BUCKET_NAME>"Supported sources for Sippy include Amazon S3, GCS, Azure Blob, and S3-compatible endpoints (Sippy — Supported providers). Super Slurper adds the same broad provider list, with tested S3-compatible examples such as Backblaze B2 and Wasabi (Super Slurper, S3-compatible changelog).
Combined migration strategies (active vs quiet source)
Section titled “Combined migration strategies (active vs quiet source)”From Migration Strategies:
Source still read/written often: Enable Sippy and point the app at R2 (new writes go to R2). Run Super Slurper for the remainder with Overwrite files? → Skip existing.
Source rarely read: Run Super Slurper first (note: objects uploaded after listing may be missed), then enable Sippy for stragglers on demand.
For throughput, run up to three concurrent Super Slurper jobs and split by bucket subpath prefix (Migration Strategies — performance). Cloudflare reported up to 5× faster Super Slurper transfers after a distributed redesign (changelog).
Pricing: Super Slurper and Sippy themselves are free; you pay R2 Class A/B operations and storage, and the source bucket may still charge for reads (R2 pricing — Super Slurper and Sippy).
ETags: After Sippy or Super Slurper, ETags may not match the source; do not use ETag equality as a migration correctness check (Sippy — ETags, Super Slurper — ETags).
Archival classes: Super Slurper skips S3 Glacier (except Glacier Instant Retrieval) and certain Intelligent-Tiering deep archive objects—same class of skips as Import from S3 for Images imports.
Common mistakes when adopting R2
Section titled “Common mistakes when adopting R2”- Using
r2.devin production despite variable rate limits and HTTP 429 (Limits). - Expecting instant consistency on cached custom domains after overwrite or delete without cache purge (Consistency — Caching).
- Connecting a custom domain before Access, unintentionally making the bucket public (Protect an R2 Bucket with Cloudflare Access).
- Leaving
r2.devenabled while locking down a custom domain with WAF or Access (Public buckets). - Assuming Sippy syncs updates from source after the first copy—it does not re-fetch changed source objects (Sippy — GetObject considerations).
- Relying on matching ETags post-migration (Sippy ETags).
- Creating a CNAME to
r2.dev—documented as unsupported for production reliability (Public buckets — development URL).
How to check this on your site
Section titled “How to check this on your site”- In the Cloudflare dashboard R2 overview, confirm the bucket exists, default privacy, and which public endpoints (custom domain and/or
r2.dev) are Allowed per Public buckets. - Call GetObject via S3 API or a Worker binding on a test key; compare behavior with and without caching on a custom domain (consistency model).
- If Sippy is enabled, open the bucket Metrics tab and review “Requests served by Sippy” and “Data migrated by Sippy” (Sippy — View migration metrics).
- For an in-flight Super Slurper job, review status on the Data migration page and migration logs in the dashboard (Super Slurper).
- You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page disagrees with your setup or with current Cloudflare docs, email yimasynthetic@gmail.com with the page URL and the exact sentence you think is wrong so it can be corrected or clarified.