Sub topic 1
How DNS Works with Amazon Route 53
Prerequisites
Assume you understand IP addresses, ports, basic command-line use, and AWS resources such as VPCs and CloudFront.
Resolvers, authoritative servers, and TTL
The Domain Name System (DNS) maps names such as www.example.com to values such as IP addresses. A client usually asks a recursive resolver, often provided by an internet service provider or a company network. The resolver finds the answer and caches it.
If the answer is not cached, the resolver asks DNS servers in stages:
- A root server points to the
.comname servers. - A top-level-domain server points to the authoritative name servers for
example.com. - An authoritative server returns the record stored for
www.example.com.
An authoritative server is responsible for the official records for a domain. Route 53 can provide those authoritative servers.
A record's time to live (TTL) tells resolvers how many seconds they may cache its answer. A short TTL allows faster changes but causes more DNS queries. A long TTL reduces queries but delays changes after an update.
Registering a domain
A domain registrar records who controls a domain and which name servers are authoritative. Route 53 can register supported domains, or you can keep registration with another registrar. These choices are independent of where DNS is hosted.
Creating a public hosted zone
A public hosted zone is a Route 53 container for records that internet resolvers can query. Create one for the domain, such as example.com. Route 53 creates an NS record and an SOA record automatically. Add application records, such as A, AAAA, or MX, to the zone.
Delegating the domain
After creating the zone, copy its four Route 53 name servers into the registrar's name-server settings. This delegation tells the parent zone where example.com records live. If the domain is registered in Route 53, this step is usually managed there. Existing resolver caches can make the change appear gradually.
dig NS example.com +short
dig www.example.com AExercise
Why might a new Route 53 record not appear immediately after you create it?
Show answer
A recursive resolver may still be serving an older cached answer until that record's TTL expires.