- Newest
- Most votes
- Most comments
Hello.
CloudFront passes the accessed URL as is to the origin.
For example, when you access CloudFront as shown below, the folder "/about" is accessed, but no files are retrieved.
https://cloudfront.com/about
To retrieve a file, you need to include the file name at the end of the URL.
For example, index.html in /about needs to be accessed as follows.
https://cloudfront.com/about/index.html
Also, if you want to omit index.html in a subfolder from the URL, you need to configure CloudFront Functions as described in the document below.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example-function-add-index.html
Hi,
You may also need to add s3:listObject to allow CloudFront to work properly.
See some examples of such auth on this page: https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-policies-s3.html
Best,
Didier
The permission for listing current object versions in the bucket is
s3:ListBucket
.
Hello,
You are hosting a website through S3. The root page is opened with no issue but when you are exploring other pages then you are facing the issues.
It might be issue with your code. Your about, Contact page files may not be linked with index.html file. So once go through the website Code.
By the way, S3 can deliver websites by configuring CloudFront's OAC without enabling static website hosting. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html