I have an S3 bucket that is public and I am currently using it to serve files on a web application. However, for performance and cost improvements I'm working on setting up AWS Cloudfront to serve the files.
The setup instructions are pretty simple so I kept all the defaults and selected the bucket that I would like to serve with Cloudfront. The origin is setup like an API bucket
.s3.amazon.com.
If I put a url with the cloudfront domain into a browser I get a 403uniqueid.cloudfront.net/visual/filename.jpg
If I put the S3 url into a browser it worksbucket-name.s3.amazon.com
Most troubleshooting forums say to check the S3 policy but its clearly a Cloudfront issue rather than an S3 Policy issue. Some forums say I need to setup the Cloudfront domain with my DNS provider as a CNAME record but I assumed that was only if I was serving my website from Cloudfront which I am not.
Any ideas why I'm getting a 403?