Ok I see now:
First of all you need to make sure you followed all of the steps here:
https://aws.amazon.com/premiumsuppor...tatic-website/
Something is wrong with your Cloudfront to S3 connection. Either the bucket doesn't have the right permissions, or it's not in the right region (that does matter sometimes, I forget if it matters here), or cloudfront isn't pointing to the right bucket, or something. But my money is on the permissions.
In cloudfront your s3 origin name should look something like this: [YOUR BUCKET NAME GOES HERE].s3.us-west-2.amazonaws.com. I don't think it should have www in the name.
In S3 you need to turn off Block Public Access, and explicitly give cloudfront access to the S3 bucket. Under Permissions, your bucket policy should look something like this:
Code:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "2",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity [CLOUDFRONT DISTRIBUTION NAME GOES HERE]"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::[YOUR BUCKET NAME GOES HERE]/*"
}
]
}
Last edited by suzzer99; 04-05-2022 at 05:10 PM.