10
votes

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 same locations available in S3. Anyways, I would like to identify the one that is at least closest to my data.

3

3 Answers

6
votes

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

3
votes

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

0
votes

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