AWS Route 53 Notes

Posted: June 5, 2020 Category: devopsTagged: route53awsDNS

DNS Records - a wee and oversimplified glossary

Record typeFull NameSimplified Description
A RecordAddress RecordAssigns a name to an ip address (i.e. a name => n.n.n.n mapping).
Alias RecordAlias Record (unique to AWS)Assigns a name to an aws service endpoint (i.e. via its internal dns name: a name =>
CNAME RecordCanonical Name Recordallows several aliases to be mapped to the same domain. eg =>
NS RecordName Server ReordUsed by TLD servers to direct traffic to the content DNS server which contains the authoritative DNS records
SOAStart of Authority Recorddata identifying the adminstrator of a zone, default time-to-live, version, etc.
TLDTop Level Domaine.g. “.com”, “.org”, etc.
TTLTime To Liveindicates when the related information should be deemed “expired”, causing fetch of more upt-to-date data. Default TTL can be 24hrs or even 48 hrs.

AWS Route 53 Routing Policies

Routing policies determine how traffic is routed to a bunch of available servers.

  • Simple Routing: yield any server
  • Weighted Routing: { x% of traffic => server 1, y% of traffic to server 2, … etc}
  • Failover Routing: yield the assigned secondary server if the primary is failing
  • Geolocation Routing: yield endpoint in user’s region (regardless of latency)
  • Geoproximity Routing: The most complex routing policy. Requires creation of a traffic policy first (go to R53 > Traffic flow > Traffic policies). yields endpoint based on user’s location AND the location of your resources AND any biases you’ve set up in your traffic policies… whew!
  • Multivalue Answer: Can respond with up to 8 healthy endpoints

Remember that with all of these, end-user side (browser-side), you will generally keep hitting the same yielded ip/endpoint until the configured TTL expires.

Route53 Setup (Record Sets)

You implement routing policies with Route 53 DNS “Record sets”.

As an aside: since amazon is a domain registrar you can actually buy your domain right in AWS (currently common TLDs go for around $12USD)- or just bring your own. I guess if you buy from them, the NS records wil be setup for you, otherwise you would be going to your domain registrar and adding AWS nameservers.

Anatomy of a record set:

  • Record Type := (usually an A record)
  • TTL := choose a value that works for you
  • value := the ip address of one of your EC2 instances, for exmaple
  • routing policy := as described earlier. pick one.
  • set id := unique id for when records have the same routing info across several records
  • associate with healthcheck := check this if you want R53 to omit endpoints that are failing healthchecks, from being yielded in routing policy algos.