Container + R2 + Worker workflow is not

Container + R2 + Worker workflow is not ideal: I am using a separate container service to upload a PDF with a QR code to a remote R2 using the S3 API. My Worker accesses the uploaded PDF from R2 and emails it to the user. This works fine in staging and production but not in development, since the Worker uses a local R2 instance instead of the remote one. I can't use wrangler dev --remote because I use Durable Objects, Workflows, and Queues. Is there any workaround for this?
2 Replies
Wonky Onion
Wonky Onion2mo ago
Sounds like remote bindings would work for you - you can make just the r2 bucket remote in dev: https://developers.cloudflare.com/workers/development-testing/#remote-bindings
goofysystem
goofysystemOP2mo ago
thank you that worked!

Did you find this page helpful?