91

When we go to S3 in AWS console in "Global" option it shows

"S3 does not require region selection."

But when we create new bucket there it asks for Region !

So are S3 buckets region specific ?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Ashish Karpe
  • 5,087
  • 7
  • 41
  • 66
  • 1
    If I remember correctly when S3 was first started there was a global region, and if you created a bucket then you can still access it, but you can't create that now. – Michael Munsey Apr 04 '17 at 02:11

5 Answers5

93

The user interface shows all your buckets, in all regions. But buckets exist in a specific region and you need to specify that region when you create a bucket.

Mark B
  • 183,023
  • 24
  • 297
  • 295
  • 11
    @VictorSergienko You can access any bucket from any region, but if you want that access to be *fast* you want the bucket to be in the same region. It's the same consideration you would have for all the other regional AWS services. Your comment about the original "classic" region being globally available but new ones not being global isn't really correct. The original region was always us-east-1 (Virginia). That region still exists, and is accessible globally, like all the regions are, but you want to pick the closest region to your other services. – Mark B Jul 13 '18 at 12:51
  • Thanks! My question was: I made a pre-signed POST, and it didn’t let me upload a file from a different region (got “access denied”), but uploading to my region worked. Is this S3 regions at work, or just my mistake somewhere? I though it might be covered by this question. – Victor Sergienko Jul 13 '18 at 16:35
  • A presigned POST is generally running from a browser, but it sounds like you are trying to use it in an EC2 instance or something to upload a file? How are you running the POST *inside* a region? I'm not sure this question/answer directly covers your issue. – Mark B Jul 13 '18 at 16:42
  • Sorry, I used “region” in its non-AWS meaning - an area. POST pre-signed for Europe with v4 signature (v4 signature is region specific) from my PC in us-east-1 to European bucket didn’t work. I will check again that it’s not my mistake. – Victor Sergienko Jul 13 '18 at 16:52
19

S3 buckets are region specific, you can check http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region to get the list of end-points based on the region

From the doc on creating S3 bucket

Amazon S3 creates bucket in a region you specify. You can choose any AWS region that is geographically close to you to optimize latency, minimize costs, or address regulatory requirements. For example, if you reside in Europe, you might find it advantageous to create buckets in the EU (Ireland) or EU (Frankfurt) regions. For a list of AWS Amazon S3 regions, go to Regions and Endpoints in the AWS General Reference.

Also from UI, if you look at the properties for each of your bucket, you will see the original region

enter image description here

Frederic Henri
  • 51,761
  • 10
  • 113
  • 139
5

Yes S3 buckets are region specific.

When you create a new bucket you need to select the target region for that bucket.

For example: s3 new bucket

Hope it helps.

Eric
  • 2,636
  • 21
  • 25
5

How it works now is that if you are expecting the content to load fast globally, you create a bucket for every region you want your data to load quickly from, but use 'Versioning' to auto duplicate content from one bucket to the other.

Click on one of your buckets, then go to Management, then go to 'Replication'. Follow the instructions to setup a rule that will copy from one bucket to another.

Congratualtion, you now have globally fast content from a single bucket.

I appreciate if this seems a little off-piste, but I think this is what we are all really looking to achieve.

Belphegor
  • 71
  • 1
  • 4
  • 3
    Would you not just use CloudFront instead? – Boris Aug 05 '21 at 02:55
  • If our goal is having fast loading from different regions, I believe the better solution is having S3 behind CloudFrount as @Boris mentioned above (in that case particular Edge Location will cache already requested file during particular period of the time) Replicating data in multiple S3 buckets in different regions makes sense when your goal is data durability (in case of outage in particular region or data lost, you have a copy in another S3 bucket in another region) – Eugene Rotar Apr 17 '22 at 01:27
2

There is a related answer that highlights one important point: although the console and the CLI allow viewing buckets in all regions, probably due to the fact that bucket names must be globally unique, buckets are still tied to a region.

This matters, for example, when dealing with permissions. You may have Infrastructure as Code generalized with roles that give permissions to all buckets for the current region. Although the CLI might give you the impression that a newly created bucket can be seen in all regions, in reality you may end up with errors if you fail to specifically grant access to a service running in one region but requiring access to an S3 bucket in another region.

Nagev
  • 10,835
  • 4
  • 58
  • 69