Interview Prep/AWS/Route 53, CloudFront, API Gateway and Messaging

You created a public hosted zone and records for `example.com`, but `dig example.com` returns `NXDOMAIN` or old records.

BeginnerTroubleshootingRoute 53, CloudFront, API Gateway and Messaging
Answer

Likely causes → The registrar still points to the old name servers, not to the four NS records of the new hosted zone. Another cause: two hosted zones exist for the same name and you edited the one that is not delegated.

Diagnose →

aws route53 list-hosted-zones-by-name --dns-name example.com
aws route53 get-hosted-zone --id Z0123ABC --query 'DelegationSet.NameServers'
dig NS example.com +short
dig @a.gtld-servers.net NS example.com +norecurse   # what the parent zone delegates to

Fix →

  1. Update the NS at the registrar to match the zone's delegation set. For Route 53 Domains, run aws route53domains update-domain-nameservers
  2. Delete the duplicate zone

Prevent → Use one hosted zone per domain in IaC, with an output that checks delegation, and lower NS TTLs before migrations.

aws All AWS questions Roadmap: AWS core services

More on Route 53, CloudFront, API Gateway and Messaging