AWS Route53
Sat, Jul 22, 2017Amazon Route 53 is a highly available and scalable DNS service offered by AWS. Like any DNS service, Route 53 handles domain registration and routes users’ Internet requests to your application – whether it’s hosted on AWS or elsewhere. But Route 53 also intelligently directs traffic based on sophisticated routing policies and, through automated health checks, away from servers that might be failing.

Domain Name System (DNS)
Domain Name Servers (DNS) are the Internet’s equivalent of a phone book. They maintain a directory of domain names and translate them to Internet Protocol (IP) addresses.
- DNS uses a hierarchical name structure, and different levels in the hierarchy are each separated with a dot (.).
- Consider the domain names www.amazon.com and aws.amazon.com.
- com is the Top-Level Domain (TLD)
- amazon is the Second-Level Domain (SLD).
- There can be any number of lower levels
AWS supposedly named the service Route 53 because all DNS requests are handled through port 53.
Domain Name System (DNS) Concepts
- Top-Level Domains (TLDs): A Top-Level Domain (TLD) is the most general part of the domain. The TLD is the farthest portion to the right (as separated by a dot). Common TLDs are .com, .net, .org, .gov, .edu, and .io.
- Domain Names: A domain name is the human-friendly name that we are used to associating with an Internet resource.
- IP Addresses: An IP address is a network addressable location. Each IP address must be unique within its network. For public websites, this network is the entire Internet.
Hosts: Within a domain, the domain owner can define individual hosts, which refer to separate computers or services accessible through a domain.
- domain owners make their web servers accessible through the base domain (example.com) and also through the host definition www (as in www.example.com).
- Application Program Interface (API) access through an API host (api.example.com)
- File Transfer Protocol (FTP) access with a host definition ftp.example.com
- files access with a host files.example.com.
Subdomains: DNS works in a hierarchal manner and allows a large domain to be partitioned or extended into multiple subdomains. TLDs can have many subdomains under them. For instance, zappos.com and audible.com are both subdomains of the .com TLD (although they are typically just called domains). The zappos or audible portion can be referred to as an SLD. Likewise, each SLD can have subdomains located under it. For instance, the URL for the history department of a school could be www.history.school.edu. The history portion is a subdomain.
The difference between a host name and a subdomain is that a host defines a computer or resource, while a subdomain extends the parent domain. Subdomains are a method of subdividing the domain itself.
- Fully Qualified Domain Name (FQDN): A fully qualified domain name (FQDN) contains both a host name and a domain name.

Name Servers: A name server is a computer designated to translate domain names into IP addresses. These servers do most of the work in the DNS. Because the total number of domain translations is too much for any one server, each server may redirect requests to other name servers or delegate responsibility for the subset of subdomains for which they are responsible.
Zone Files: A zone file is a simple text file that contains the mappings between domain names and IP addresses.
Zone files reside in name servers and generally define the resources available under a specific domain, or the place where one can go to get that information.
- Top-Level Domain (TLD) Name Registrars: A domain name registrar is an organization or commercial entity that manages the reservation of Internet domain names.
Record Types
Each zone file contains records. In its simplest form, a record is a single mapping between a resource and a name. These can map a domain name to an IP address or define resources for the domain, such as name servers or mail servers.
- Start of Authority (SOA) Record: A Start of Authority (SOA) record is mandatory in all zone files, and it identifies the base DNS information about the domain. Each zone contains a single SOA record.
- A and AAAA: Both types of address records map a host to an IP address. The A record is used to map a host to an IPv4 IP address, while AAAA records are used to map a host to an IPv6 address.
- Canonical Name (CNAME): A Canonical Name (CNAME) record is a type of resource record in the DNS that defines an alias for the CNAME for your server (the domain name defined in an A or AAAA record).
- Mail Exchange (MX): Mail Exchange (MX) records are used to define the mail servers used for a domain and ensure that email messages are routed correctly. The MX record should point to a host defined by an A or AAAA record and not one defined by a CNAME.
- Name Server (NS): Name Server (NS) records are used by TLD servers to direct traffic to the DNS server that contains the authoritative DNS records.
- Pointer (PTR): A Pointer (PTR) record is essentially the reverse of an A record. PTR records map an IP address to a DNS name, and they are mainly used to check if the server name is associated with the IP address from where the connection was initiated.
- Sender Policy Framework (SPF): Sender Policy Framework (SPF) records are used by mail servers to combat spam. An SPF record tells a mail server what IP addresses are authorized to send an email from your domain name.
- Text (TXT): Text (TXT) records are used to hold text information. This record provides the ability to associate some arbitrary and unformatted text with a host or other name, such as human readable information about a server, network, data center, and other accounting information.
- Service (SRV): An SRV record Value element consists of four space-separated values. The first three values are decimal numbers representing priority, weight, and port. The fourth value is a domain name for e.g. 10 5 80 hostname.example.com
Steps involved in DNS resolution
Your browser asks the resolving DNS server what the IP address is for amazon.com. The resolving server does not know the address, so it asks a root server the same question. There are 13 root servers around the world, and these are managed by ICANN(Internet Corporation for Assigned Names and Numbers). The root server replies that it does not know the answer to this, but it can give an address to a TLD server that knows about .com domain names. The resolving server then contacts the TLD server. The TLD server does not know the address of the domain name either, but it does know the address of the resolving name server. The resolving server then queries the resolving name server. The resolving name server contains the authoritative records and sends these to the resolving server, which then saves these records locally so it does not have to perform these steps again in the near future. The resolving name server returns this information to the user’s web browser, which also caches the information.
Route53 Routing Policy
- Simple Routing Policy: This is the most common and, as the name suggests, simplest routing type. If, say, your application server has a public IP address of 205.251.242.103, and you’d like to use the human readable address of amazon.com (assuming it’s available, of course), then you would use Route 53 to map amazon.com to your IP. From then on, any browser requests for amazon.com would be directed to 205.251.242.103.
- Weighted Routing Policy: By assigning different numeric weights (or “priorities”) to multiple servers providing a web service, you can direct a higher or lower percentage of your incoming traffic to one particular server over another. This kind of routing can be useful for load balancing and testing new versions of a software package.
- Latency based Routing Policy: A latency based policy directs traffic requests to the server that will be able to respond with the lowest possible latency (delay). You could, for instance, run your application in multiple AWS regions, and Route 53 will automatically route users to those that will deliver the quickest.
- Failover Routing Policy: A failover policy will send all traffic to the server you set as primary for as long as that server is still healthy. If, however, health checks determine that it’s failing, traffic will be diverted to a designated backup resource.
- Geolocation Routing Policy: This policy lets you designate resource targets based on your users’ geographic location. So, for example, you might want all queries from India to be routed to a server located in the same physical region in order to limit latency.
Exam Tips Route53
What does Amazon Route53 provide?
- A global Content Delivery Network.
- None of these.
- A scalable Domain Name System
- An SSH endpoint for Amazon EC2.
Does Amazon Route 53 support NS Records?
- Yes, it supports Name Service records.
- No
- It supports only MX records.
- Yes, it supports Name Server records.
Does Route 53 support MX Records?
- Yes
- It supports CNAME records, but not MX records.
- No
- Only Primary MX records. Secondary MX records are not supported.
Which of the following statements are true about Amazon Route 53 resource records? Choose 2 answers
- An Alias record can map one DNS name to another Amazon Route 53 DNS name.
- A CNAME record can be created for your zone apex.
- An Amazon Route 53 CNAME record can point to any DNS record hosted anywhere.
- TTL can be set for an Alias record in Amazon Route 53.
- An Amazon Route 53 Alias record can point to any DNS record hosted anywhere.
Which statements are true about Amazon Route 53? (Choose 2 answers)
- Amazon Route 53 is a region-level service
- You can register your domain name
- Amazon Route 53 can perform health checks and failovers to a backup site in the even of the primary site failure
- Amazon Route 53 only supports Latency-based routing
A customer is hosting their company website on a cluster of web servers that are behind a public-facing load balancer. The customer also uses Amazon Route 53 to manage their public DNS. How should the customer configure the DNS zone apex record to point to the load balancer?
- Create an A record pointing to the IP address of the load balancer
- Create a CNAME record pointing to the load balancer DNS name.
- Create a CNAME record aliased to the load balancer DNS name.
- Create an A record aliased to the load balancer DNS name
A user has configured ELB with three instances. The user wants to achieve High Availability as well as redundancy with ELB. Which of the below mentioned AWS services helps the user achieve this for ELB?
- Route 53
- AWS Mechanical Turk
- Auto Scaling
- AWS EMR
How can the domain’s zone apex for example “myzoneapexdomain com” be pointed towards an Elastic Load Balancer?
- By using an AAAA record
- By using an A record
- By using an Amazon Route 53 CNAME record
- By using an Amazon Route 53 Alias record
You need to create a simple, holistic check for your system’s general availability and uptime. Your system presents itself as an HTTP-speaking API. What is the simplest tool on AWS to achieve this with?
- Route53 Health Checks
- CloudWatch Health Checks
- AWS ELB Health Checks
- EC2 Health Checks
Which type of record is commonly used to route traffic to an IPv6 address?
- A. An A record
- B. A CNAME
- C. An AAAA record
- D. An MX record
Exp: An AAAA record is used to route traffic to an IPv6 address, whereas an A record is used to route traffic to an IPv4 address.
Where do you register a domain name?
- A. With your local government authority
- B. With a domain registrar
- C. With InterNIC directly
- D. With the Internet Assigned Numbers Authority (IANA)
Exp: Domain names are registered with a domain registrar, which then registers the name to InterNIC.
You have an application that for legal reasons must be hosted in the United States when U.S. citizens access it. The application must be hosted in the European Union when citizens of the EU access it. For all other citizens of the world, the application must be hosted in Sydney. Which routing policy should you choose in order to achieve this?
- A. Latency-based routing
- B. Simple routing
- C. Geolocation routing
- D. Failover routing
Exp: C. You should route your traffic based on where your end users are located. The best routing policy to achieve this is geolocation routing.
Which type of DNS record should you use to resolve an IP address to a domain name?
- A. An A record
- B. A C Name
- C. An SPF record
- D. A PTR record
Exp: D. A PTR record is used to resolve an IP address to a domain name, and it is commonly referred to as “reverse DNS.”
You host a web application across multiple AWS regions in the world, and you need to configure your DNS so that your end users will get the fastest network performance possible. Which routing policy should you apply?
- A. Geolocation routing
- B. Latency-based routing
- C. Simple routing
- D. Weighted routing
Exp: B. You want your users to have the fastest network access possible. To do this, you would use latency-based routing. Geolocation routing would not achieve this as well as latencybased routing, which is specifically geared toward measuring the latency and thus would direct you to the AWS region in which you would have the lowest latency.
Which DNS record should you use to configure the transmission of email to your intended mail server?
- A. SPF records
- B. A records
- C. MX records
- D. SOA record
Exp: C. You would use Mail eXchange (MX) records to define which inbound destination mail server should be used.
Which DNS records are commonly used to stop email spoofing and spam?
- A. MX records
- B. SPF records
- C. A records
- D. C names
Exp: B. SPF records are used to verify authorized senders of mail from your domain.
You are rolling out A and B test versions of a web application to see which version results in the most sales. You need 10 percent of your traffic to go to version A, 10 percent to go to version B, and the rest to go to your current production version. Which routing policy should you choose to achieve this?
- A. Simple routing
- B. Weighted routing
- C. Geolocation routing
- D. Failover routing
Exp: B. Weighted routing would best achieve this objective because it allows you to specify which percentage of traffic is directed to each endpoint.
Which DNS record must all zones have by default?
- A. SPF
- B. TXT
- C. MX
- D. SOA
Exp: D. The start of a zone is defined by the SOA; therefore, all zones must have an SOA record by default.
Your company has its primary production site in Western Europe and its DR site in the Asia Pacific. You need to configure DNS so that if your primary site becomes unavailable, you can fail DNS over to the secondary site. Which DNS routing policy would best achieve this?
- A. Weighted routing
- B. Geolocation routing
- C. Simple routing
- D. Failover routing
Exp: D. Failover-based routing would best achieve this objective.
Which type of DNS record should you use to resolve a domain name to another domain name?
- A. An A record
- B. A CNAME record
- C. An SPF record
- D. A PTR record
Exp: B. The CNAME record maps a name to another name. It should be used only when there are no other records on that name.
Which is a function that Amazon Route 53 does not perform?
- A. Domain registration
- B. DNS service
- C. Load balancing
- D. Health checks
Exp: C. Amazon Route 53 performs three main functions: domain registration, DNS service, and health checking.
Which DNS record can be used to store human-readable information about a server, network, and other accounting data with a host?
- A. A TXT record
- B. An MX record
- C. An SPF record
- D. A PTR record
Exp: A. A TXT record is used to store arbitrary and unformatted text with a host.
Which resource record set would not be allowed for the hosted zone example.com?
- A. www.example.com
- B. www.aws.example.com
- C. www.example.ca
- D. www.beta.example.com
Exp: C. The resource record sets contained in a hosted zone must share the same suffix.
Which port number is used to serve requests by DNS?
- A. 22
- B. 53
- C. 161
- D. 389
Exp: B. DNS uses port number 53 to serve requests.
Which protocol is primarily used by DNS to serve requests?
- A. Transmission Control Protocol (TCP)
- B. Hyper Text Transfer Protocol (HTTP)
- C. File Transfer Protocol (FTP)
- D. User Datagram Protocol (UDP)
Exp: D. DNS primarily uses UDP to serve requests.
Which protocol is used by DNS when response data size exceeds 512 bytes?
- A. Transmission Control Protocol (TCP)
- B. Hyper Text Transfer Protocol (HTTP)
- C. File Transfer Protocol (FTP)
- D. User Datagram Protocol (UDP)
Exp: A. The TCP protocol is used by DNS server when the response data size exceeds 512 bytes or for tasks such as zone transfers.
What are the different hosted zones that can be created in Amazon Route 53?
- Public hosted zone
- Global hosted zone
- Private hosted zone
- A. 1 and 2
- B. 1 and 3
- C. 2 and 3
- D. 1, 2, and 3
Exp: B. Using Amazon Route 53, you can create two types of hosted zones: public hosted zones and private hosted zones.
Amazon Route 53 cannot route queries to which AWS resource?
- A. Amazon CloudFront distribution
- B. Elastic Load Balancing load balancer
- C. Amazon EC2
- D. AWS OpsWorks
Exp: D. Amazon Route 53 can route queries to a variety of AWS resources such as an Amazon CloudFront distribution, an Elastic Load Balancing load balancer, an Amazon EC2 instance, a website hosted in an Amazon S3 bucket, and an Amazon Relational Database (Amazon RDS).
When configuring Amazon Route 53 as your DNS service for an existing domain, which is the first step that needs to be performed?
- A. Create hosted zones.
- B. Create resource record sets.
- C. Register a domain with Amazon Route 53.
- D. Transfer domain registration from current registrar to Amazon Route 53.
Exp: D. You must first transfer the existing domain registration from another registrar to Amazon Route 53 to configure it as your DNS service.