-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How is region determined if not explicitly passed? #2431
Comments
If you send an unauthed To demonstrate: I used the following curl command: Here are the response headers I got:
You can see the interesting bits are: |
@stealthycoin Thanks! it seems to work very similar to my situation except that for my stuff I don't get a 307, but a 301, and I'm not getting
Is |
Make sure the To be clear its |
I still get a 301
|
So if the bucket is hosted in |
Ah cool, thank you, this resolves my issue |
The API endpoint GetBucketLocation requires top level permission. If we do a head request to a bucket, even an unauthenticated request, the bucket location will be returned in the HTTP headers. See aws/aws-cli#2431 (comment)
The API endpoint GetBucketLocation requires top level permission. If we do an authenticated head request to a bucket, the bucket location will be returned in the HTTP headers. See aws/aws-cli#2431 (comment)
The API endpoint GetBucketLocation requires top level permission. If we do an authenticated head request to a bucket, the bucket location will be returned in the HTTP headers. See aws/aws-cli#2431 (comment)
The API endpoint GetBucketLocation requires top level permission. If we do an authenticated head request to a bucket, the bucket location will be returned in the HTTP headers. See aws/aws-cli#2431 (comment)
How does the
aws s3 ls s3://...
command determine what region to use if the user doesn't specify one?We're working with a bucket where we don't have top level permissions, but only permissions for reading files with a given prefix.
Our code using the Go SDK used to use
GetBucketLocation
to get the correct region before trying to list files. But now, we don't have top level bucket read permissions so that's not an option anymore.We were hoping we could learn from what
aws-cli
does to do the "right thing".The text was updated successfully, but these errors were encountered: