how to identify the bucket region for an external bucket with just the bucket name?

0

Is there a way to identify the bucket region for a bucket I don't own with just the bucket name?

AWS
asked 4 months ago255 views
2 Answers
0
profile picture
EXPERT
answered 4 months ago
  • Doesn't this require owning the bucket, or at least knowing which account does?

0

Hi,

For buckets with public access that you don't own, curl -sI https://<bucket-dns> | grep bucket-region should work. It returns x-amz-bucket-region: <region-name>.

AFAIK, for private buckets that you don't know: no way to know the region. And obviously, it is by design.

Best,

Didier

profile pictureAWS
EXPERT
answered 3 months ago
profile picture
EXPERT
Steve_M
reviewed 3 months ago
  • This is a really neat way of getting the required info. It may be better to use http:// rather than https:// though, as in cases where the bucket is being used for static website hosting the https:// address will return an SSL error.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions