Route 53 & DNS

Route 53 is AWS's DNS service — it translates domain names like codeatlas.thepys.in into the actual IP addresses or service endpoints that traffic should be routed to, and lets you register and manage domains directly through AWS if you want to.

Hosted zones and records

A hosted zone is a container for all the DNS records belonging to one domain. Inside it, individual records map names to destinations:

bash terminal
aws route53 list-resource-record-sets --hosted-zone-id Z0123ABC
Output (abridged)
{
  "ResourceRecordSets": [
    {"Name": "codeatlas.thepys.in.", "Type": "A", "ResourceRecords": [{"Value": "76.76.21.21"}]},
    {"Name": "codeatlas.thepys.in.", "Type": "TXT", "ResourceRecords": [{"Value": "\"google-site-verification=...\""}]}
  ]
}

Common record types

An A record points a name directly at an IPv4 address. A CNAME record points a name at another name instead of an address — useful when the destination's IP might change, since you only ever update it in one place. An MX record tells the internet which mail servers handle email for a domain. A TXT record holds arbitrary text, commonly used to prove domain ownership to an outside service.

DNS changes aren't instant: every record has a TTL (time to live) that tells other DNS resolvers how long they're allowed to cache it before checking again. Lowering a record's TTL before a planned change means the old value gets flushed out of caches faster once you update it — changing a record with a 24-hour TTL can mean waiting up to a day for every resolver worldwide to see the new value.

Routing policies

Beyond simple one-answer records, Route 53 supports routing policies like weighted (split traffic between multiple destinations by percentage), latency-based (send users to whichever region responds fastest for them), and failover (automatically switch to a backup destination if health checks on the primary start failing).