0

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

smac2020
  • 9,637
  • 4
  • 24
  • 38
Anup Kumar
  • 51
  • 8

1 Answers1

3

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

Palash Bansal
  • 708
  • 4
  • 9