S3 and Cloudfront prismic preview access denied

Hello everybody!

My team have faced problems with the Prismic previews on the S3 CloudFront. We have followed all recommendations for setting Prismic previews in Gatsby and setup for AWS. However we are still getting faced with problem.

Everything seems to work related to Prismic, we get to /preview and then get rerouted to /blog-name. Prismic preview is working perfectly on local host and netlify, but we have mentioned problem above on AWS.

We are aware this isn't strictly related to Prismic, but we are wondering if someone have dealt with this problem and is willing to spare us some time by revealing what is problem or what could be problem.

Thank you in advance!

Hello @cromartin11, This may be due to a permission error in the Cloudfront setup. Check out this conversation I found online: