Is there any way I could setup bindings on a worker for r2_buckets from different accounts?
In my worker.toml, instead of having something like
The
bucket_name
is merely for the buckets in the account where this bucket will be deployed. I am wondering if there is a way to bind buckets from other accounts from within the same worker. (Without using the typical API key for every request)
The goal is to be able to take advantage of the bindings usefulness isntead of having to manually craft a POST request for everything I am doing.
Just wondering if there is someway to do this within wrangler.toml or if I have to end up doing something like the following:
This approach described above would manually require me to use an api key with permissions to email 1 and 2, and craft those requests by hand, as opposed to just using the bindings that "just work"
Any thoughts on this would be very helpful and appreciated, thanks!3 Replies
This of course assumes the account on which this worker is deployed to has access to those other accounts. Even If there is an API key I should set, wondering if there is an automated way
I'm not aware of any way for a worker to access resources via binding in another account. The only way I can think to do this would be via the API directly.
Lots of work lies ahead then! Thanks nonetheless
=]