简体   繁体   中英

How to remove region from an Amazon S3 website endpoint url?

I am trying to build a static website with Amazon S3.

I am using east-1 (N. Virginia) as my region but the website getting an error.

http://s3.amazonaws.com/egiig/index.html is my website.

For reference please see-

https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html

The requests of the form https://s3.amazonaws.com/bucket-name are Legacy Path Style requests. See the Legacy Global Endpoint section in the Virtual Hosting docs

According to the page:

For the US East (N. Virginia) Region, the legacy global endpoint can be used for path-style requests. For all other Regions, the path-style syntax requires that you use the Region-specific endpoint when attempting to access a bucket

In your case for anup365 the region is us-west-1 that's why its showing a permanent redirect error.

For your bucket egiig , the region was correct, but you were getting Access Denied error, which means Public access was not enabled for those files. You can do that similar to anup365 for index.html and the website should be accessible at http://s3.amazonaws.com/egiig/index.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM