Open rustyconover opened 2 years ago
I don't believe we have a way currently to automatically just re-make the request pointing to the correct location. The easiest way to get this to work knowing ahead of time of the proper region would be to make the request as,
S3.list_objects_v2("rusty-data-first-step"; aws_config=AWSConfig(; region="us-east-2"))
It should be an easy enough change to see if the response is a PermanantRedirect
, and just changing the endpoint in the request to response["Endpoint"]
and re-sending it.
My default profile uses region
us-east-1
but I'm using a bucket inus-east-2
.There doesn't seem to be any code in the module that remembers the redirects for buckets in different regions and automatically uses those endpoints.
Also its not entirely clear how to set the correct endpoint that should be used explicitly.