0

I'm receiving a 403 when I point my custom domain name 'example.com' to my CloudFront url 'xxx.cloudfront.net'.

If I go to the CloudFront URL directly everything works as expected, but when I try to access it through 'example.com' (which points to the same CloudFront url) I get the 403.

Am I missing some type of permissions setup in CloudFront somewhere?

Cloudfront is pulling from an S3 bucket with Static hosting enabled with the following bucket policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadForGetBucketObjects",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::exampleBucket/*"
        }
    ]
}

1 Answer 1

1

The answer to this was to provide the CNAME (Alternate Domain Names (CNAMEs)) in Cloudfront. Which solved the issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.