I’m using an AWS S3 bucket configured as a static website endpoint as the origin of a CloudFront distribution for this website. I pulled up my website to browse it and I started getting access denied errors as soon as I tried to click any link.
My endpoint was specified incorrectly.
- Open the CloudFront console.
- Choose your CloudFront distribution, and then choose Distribution Settings.
- Choose the Origins and Origin Groups tab.
- Review the domain name under Origin Domain Name and Path.
REST API endpoints use the format:
Website endpoints use the format:
where s3-website-us-east-1 more generically is s3-website-REGION
That fixed my problem, but there are other issues that could also lead to the same error message.