Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any difference on the url you use to Amazon S3 files?

I noticed that there are two urls to open my files on amazon s3 buckets:

1) http://BUCKETNAME.s3.amazonaws.com/FOLDER/FILE.jpg

2) http://s3-sa-east-1.amazonaws.com/BUCKETNAME/FOLDER/FILE.jpg

Is there any difference on the way the files are accessed, charged or anything?

Thanks.

like image 885
Rogerio Chaves Avatar asked Sep 30 '22 03:09

Rogerio Chaves


1 Answers

Depending on the region, there are at least 3 different ways to form a URL for an object in S3; the two you've already mentioned, plus this one:

http://bucketname.s3-xx-xxx-n.amazonaws.com/path/to/file

Here, s3-xx-xxx-n is the regional endpoint (e.g. s3-sa-east-1) for non us-standard-region buckets, or the geographic East/West s3-external-1 and s3-external-2 endpoints for US standard region buckets.

For any given bucket, they are otherwise functionally equivalent, and the pricing is the same. One difference is that the urls beginning with the bucket name do not work with https if your bucket name has any dots in it, because of the way wildcard certificates work.

http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html

like image 86
Michael - sqlbot Avatar answered Nov 15 '22 14:11

Michael - sqlbot