Access Denied for index.html Amazon S3 static website

六眼飞鱼酱① 提交于 2020-04-10 03:12:06

问题


I've set up an example static website on Amazon S3 and I added a custom folder to it with file inside: custom-folder/index.html, but I'm getting Access Denied error when trying to access url /custom-folder.

The index document is configured to be index.html, so S3 should serve index.html when I'm accessing /custom-folder url, but it doesn't work.

How can I fix this?


回答1:


It seems you are using the wrong URL to access the bucket. For example, when you enable to static website hosting feature in S3 (us-west-2 in this example), you are given a URL with the following format:

Endpoint : http://bucket-name.s3-website-us-west-2.amazonaws.com

You can see your endpoint by going to S3 > Click on your bucket > Bucket Properties > Static website hosting > should reveal your endpoint.



来源:https://stackoverflow.com/questions/48041381/access-denied-for-index-html-amazon-s3-static-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!