Score:0

Can't access static site S3, Cloudfront, Route53

bh flag

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!

Score:0
iq flag

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

vypr907 avatar
bh flag
What do you mean by 'start the route53'?
pierre fro avatar
iq flag
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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.