-
Notifications
You must be signed in to change notification settings - Fork 12
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
S3 permissions request: GetBucketLocation #1130
Comments
I believe we deliberately direct everybody to the one bucket because we can't guarantee the mirror will work. |
That's a separate issue. I'm asking for the buckets (however they're used) to have matching configurations.
|
Sorry I thought you meant you wanted to get the region in order to decide which bucket to use but you mean you want it in order to decide where to put your consumer? |
Ish. The AWS SDKs require setting a region in order to configure the client that talks to the S3 API. Some S3 APIs (like |
I am not sure why this isn't working, the buckets have identical policies.
|
These work: |
I'll do some more digging to figure out how it's supposed to work (to be clear: next action is on me, which may well lead to just closing this issue--thanks!). Something doesn't seem right here (and you shouldn't need to know the bucket's region to, um, look up the bucket's region). ❯ aws --region us-west-2 s3api get-bucket-location --bucket osm-planet-eu-central-1
An error occurred (AccessDenied) when calling the GetBucketLocation operation: Access Denied
❯ aws --region eu-central-1 s3api get-bucket-location --bucket osm-planet-eu-central-1
{
"LocationConstraint": "eu-central-1"
} |
I'm holding it wrong. I was just looking at aws/aws-sdk-go#720 (comment) too. It sounds like it's related to making calls as someone other than the bucket owner. This works as expected: ❯ aws --region eu-central-1 --no-sign-request s3api head-bucket --bucket osm-planet-eu-central-1
{
"BucketRegion": "eu-central-1",
"AccessPointAlias": false
}
❯ aws --region us-west-2 --no-sign-request s3api head-bucket --bucket osm-planet-eu-central-1
{
"BucketRegion": "eu-central-1",
"AccessPointAlias": false
} Thank you for coming along on my journey. |
Please add
s3:GetBucketLocation
permission to the bucket policy for theosm-planet-eu-central-1
S3 buckets on AWS. This will allow data consumers to write code that can automatically resolve the right region to use when accessing a bucket w/o parsing the bucket name.Without this permission, calls will return access denied:
This currently works for the
us-west-2
-hosted bucket:The text was updated successfully, but these errors were encountered: