Companion With Multiple s3 Regions

Hey everyone!

Hope you’re all doing good!

So, I’ve got this express server running companion for s3, and I’m trying to figure out how to get users to upload to different regions. I’ve been looking around, but there’s not much info on this. I’m thinking maybe I should set up multiple companion endpoints on my express app? Like, one for /au and another for /us, each uploading to a different s3 region.

And then on the client side (I’m using React), should I just create separate instances for each companion endpoint?

Does anyone have experience with this or know if I’m on the right track? Any tips would be super helpful!

(for better download speeds mainly, because wasabi s3 singapore, download speeds hasn’t been good across regions (with or without cdn (cloudflare)))

Thanks in advance!

Hi, usually when you deploy your app/backend to multiple regions, it automatically uploads within that region (so US user will end up in a US bucket).

If you want to let users in the US upload to a bucket in AU conditionally, then you will have to write some custom logic to move the upload yourself.

Thank you for the reply merlijn. Yeah I’m keeping it simple with single backend. In this case, your saying better option would be ignore uppy for this, and just do workflow on backend taking from initial s3 and move to another s3 bucket? i suppose that does make most sense really

Yes that would simplify the client and your hosting

1 Like