0

I apologize if this needs to be split into two questions, but I'm trying to set up a static site using S3, a CloudFront distribution, and a Route53 domain. If I try to access laszloffy.com, I receive a DNS_PROBE_FINISHED_NXDOMAIN error. If I try www.laszloffy.com, I get an XML 'Access Denied' error.

Below is my current configuration

Route53 records:

  • laszloffy.com - NS
  • laszloffy.com - SOA
  • *.laszloffy.com - A - routes to Cloudfront distro
  • *.laszloffy.com - AAAA - routes to https.....cloudfront.net
  • ___.laszloffy.com - CNAME - routes to ____.acm-validations.aws

CloudFront Distro:

Alternate domain names:

  • *.laszloffy.com
  • laszloffy.com Default root object - index.html Origin:
  • domain: slaszloffy-devops-resume.s3.us-east-2.amazonaws.com
  • path: /index.html
  • OAC Error page: 403 to /index.html/200 status code Function: appends index.html to requests that don't included file name or extension in URL

S3 Bucket

  • static site hosting: OFF

  • bucket policy:

    "Version": "2012-10-17",
    "Id": "PolicyForCloudFrontPrivateContent",
    "Statement": [
        {
            "Sid": "AllowCloudFrontServicePrincipal",
            "Effect": "Allow",
            "Principal": {
                "Service": "cloudfront.amazonaws.com"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::slaszloffy-devops-resume/*",
            "Condition": {
                "StringEquals": {
                    "AWS:SourceArn": "arn:aws:cloudfront::107900886402:distribution/E1LP8SF6WAC8XK"
                }
            }
        }
    ]
}

I've been looking through resources like this answer, and the AWS documentation, and it feels like I've got everything configured correctly, but obviously I'm missing something. Would love the community's assistance!

1 Answer 1

0

Can you access the bucket directly with its ARN? If yes..

2
  • What do you mean by 'start the route53'? Nov 18, 2022 at 15:39
  • sorry.. some autocorrect that did that. so.. can you access the bucket with its arn:aws:s3:::slaszloffy-devops-resume/ address? If that works. you have to fiddle with the Cloudfront. also.. stop the AAA Pointer.. make A Pointer work first...then use AAA if necessary.
    – pierre fro
    Nov 18, 2022 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.