AWS CloudFront 403 Error – Accessing from Registered Domain

amazon-cloudfrontamazon-route53cdndomain-name-system

I have a static website hosted on S3 distributed by CloudFront. If I reach the website through the CloudFront domain (d3agx9libnsfm1.cloudfront.net) it works. But when I try to reach the website through the registered domain (www.1simplesfavor.com.br), I've got an 403 error.

If I can reach the website from CloudFront but not from the registered domain, what is the error?

Here is the CDN configuration:

CDN Config

Here is the CloudFront config:

CloudFront config

I've done all the checks from this and everything seems fine: https://aws.amazon.com/premiumsupport/knowledge-center/s3-website-cloudfront-error-403/

Detail: The domain had the NS changed in the past 24h, can this be related to some dns propagation or something?

Best Answer

From what I can see you're missing the following:

  • Create a record for www.1simpleflavor.com.br, otherwise only 1simpleflavor.com.br will work
  • Make sure that you're using the alias function correctly for your root A record.

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html