开发者

In what geographical region is my S3 bucket stored?

I have created an Amazon Web Services S3 bucket in the past, without specifying the geographic region for it to be stored in. How do I determine which region the bucket is located in?

My reason for asking, is that I am preparing to run some "Amazon Elastic MapReduce" jobs on the data in the bucket, and this service asks me in what region I want the job to run. As it seems reasonable to run the job as close to the data as possible, I would like to know where to data actually is.

The options in Elastic MapReduce are:

  • US East (Virginia)
  • US West (N. California)
  • EU West (Ireland)

I am not if these are the exact sam开发者_运维技巧e locations available in S3. Anyways, I would like to identify the one that is at least closest to my data.


Unless you specified something else, it'll be North America.

If you log in to Amazon web services, and view your usage report, it'll tell you whether it's EU / US or something other.

From reading the Amazon S3 / MapReduce stuff, the regions are different between the two apps, so you probably want to stick to either EU or US (rather than east or west).

Cheers


You can use the GET Location Bucket request. Most probably your bucket is in US.


For anyone else who comes across this looking for a way to determine the region of a bucket, regardless of whether you're the bucket owner (which is a constraint of GET bucket location), use HEAD Bucket, e.g.:

curl -sI foo.s3.amazonaws.com | awk '/^x-amz-bucket-region:/ { print $2 }'

which returns the value of the header x-amz-bucket-region for the bucket "foo", in this case:

us-east-1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜