Reputation: 429
I am located in Asia-Pacific(Mumbai) region. I have S3 bucket abc.
I have a image A.png with full public read access.
So now URL i can use to access it from internet as suggested by AWS in AWS console is:
I can also access Image from Following URLs as well:
Now AWS Docs here Provides following info:
If my bucket is in US-East(N.Virginia), the URL format provided is
So my question here is, Do i need to keep in mind about the URL patterns while using public URLs in my applications?
Why AWS is giving different URL patterns instead of standardising one format for virtual-hosted-style and one format for path-style?
Please let me know if i misunderstood any technical details here.
Upvotes: 3
Views: 4255
Reputation: 1923
The URL structure you're referring to is called the REST endpoint, as opposed to the Web Site Endpoint.
If your bucket is really in the us-east-1 region of AWS -- which the S3 documentation formerly referred to as the "US Standard" region, but was subsequently officially renamed to the "U.S. East (N. Virginia) Region" -- then http://s3-us-east-1.amazonaws.com/bucket/ is not the correct form for that endpoint, even though it looks like it should be. The correct format for that region is either http://s3.amazonaws.com/bucket/ or http://s3-external-1.amazonaws.com/bucket/.¹
The format you're using is applicable to all the other S3 regions, but not US Standard US East (N. Virginia) [us-east-1].
You can get the list of endpoints from here:
https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
You should use website endpoint & rest endpoint as per actual requirement and use cases.
Please find the details here:
https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html#WebsiteRestEndpointDiff
s3-external-1.amazonaws.com has been referred to as the "Northern Virginia endpoint.
Upvotes: 1