Technical questionAccepted answer
How can I determine the region for a public AWS S3 bucket?
Nicokofi
Jul 20
0 views1
I know I can determine the region for AWS S3 buckets I own by doing:
aws s3api get-bucket-location --bucket <my-bucket>
but how can I determine the region for a public access bucket (which clearly I do not own)?
If I try to access one of the AWS Open Data buckets like noaa-goes16:
$ aws s3api get-bucket-location --bucket noaa-goes16
I get:
An error occurred (AccessDenied) when calling the GetBucketLocation operation: Access Denied
1 answer
Accepted answer · original discussion
Rich Signell
PermalinkJul 20
Yeah, you would think this would be easier to figure out, but here's the method I use:
$ curl -sI https://noaa-goes16.s3.amazonaws.com | grep bucket-region
which returns:
x-amz-bucket-region: us-east-1
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.