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

You changed an A record an hour ago, but some users still reach the old server, and a newly created name returned `NXDOMAIN` for a while.

AdvancedTroubleshootingRoute 53, CloudFront, API Gateway and Messaging
Answer

Likely causes → Resolvers cache the old answer for the record's TTL (it was 86400). For the new name, the earlier NXDOMAIN was negatively cached for the SOA minimum TTL (default 900s in Route 53, but it can be set higher). Some clients and JVMs cache longer still.

Diagnose →

dig app.example.com +noall +answer          # remaining TTL from your resolver
dig @ns-123.awsdns-45.com app.example.com   # authoritative answer
aws route53 list-resource-record-sets --hosted-zone-id Z0123ABC --query "ResourceRecordSets[?Type=='SOA']"

Fix →

  1. Wait it out, or keep the old server forwarding or redirecting until the TTL passes
  2. Flush local caches (resolvectl flush-caches)

Prevent → Lower TTLs to 60s at least one old-TTL period before a migration, avoid querying names before you create them, and keep the SOA negative TTL reasonable.

aws All AWS questions Roadmap: AWS core services

More on Route 53, CloudFront, API Gateway and Messaging