S3 to R2 migration

The blog posts for R2 mention automatic migrations from S3 to R2.

Now that R2 is in open beta, is there anything available for automatic migration from S3?

Not currently, no - I made a pretty basic Worker to do the same functionality.

Note that since Workers have no multipart bindings, the maximum size it can upload is ~5GB. https://developers.cloudflare.com/r2/platform/limits/

It’ll try and fetch the item from R2 and if it doesn’t exist, try and fetch it from S3 then return that whilst putting it into R2 for future reference.

It’s pretty basic, and more of a concept. GitHub - kotx/render: Cloudflare Worker to proxy and cache requests to R2 is a really good example of serving assets with all of the range/conditional/caching side of Workers & R2.

3 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.