URL for public Amazon S3 bucket -



URL for public Amazon S3 bucket -

i have amazon s3 bucket create public policy this

{ "version": "2012-10-17", "statement": [ { "sid": "allow public access objects", "effect": "allow", "principal": "*", "action": "s3:getobject", "resource": "arn:aws:s3:::bucket/*" } ] }

my bucket visible http://bucket.s3-website-us-east-1.amazonaws.com/

i see others refer bucket http://s3-us-east-1.amazonaws.com/bucket/

i prefer 2nd url, gives access denied.

how can alter policy allow 2nd url ?

the url construction you're referring called rest endpoint, opposed web site endpoint.

if bucket in standard region, http://s3-us-east-1.amazonaws.com/bucket/ not right form endpoint. right part http://s3.amazonaws.com/bucket/. build you're using applicable other regions, not standard.

if permissions , configuration set such web site endpoint works, rest endpoint should work, too.

however... 2 endpoints not offer same functionality.

roughly speaking, rest endpoint better-suited machine access , web site endpoint improve suited human access, since web site endpoint offers friendly error messages, index documents, , redirects, while rest endpoint doesn't. on other hand, rest endpoint offers https , back upwards signed urls, while web site endpoint doesn't.

choose right endpoint application:

http://docs.aws.amazon.com/amazons3/latest/dev/websiteendpoints.html#websiterestendpointdiff

url amazon-web-services amazon-s3 policy

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -