0
votes

With an S3 static site, I am able to hit /directory and it will serve up the index.html file inside the directory. Once I add the S3 bucket as a CloudFront origin, I instead get an Access Denied message.

How can I replicate this S3 functionality in CloudFront?

1
check your CORS and permissions on the s3 bucket - xShirase
I'm allowing all CORS and CF has s3:GetObject perms to the bucket via a bucket policy. - mark
Note that this issue can arise when building a Middleman site using Directory Indexes, deploying to S3 and using CloudFront to distribute. - chenware

1 Answers

2
votes

The fix was to setup S3 static site hosting and use CloudFront to point to it as a remote origin website instead of an S3 bucket.