The target domain name must have an A or AAAA record
NS are name servers for the hosted zone, controlling how traffic is routed for a domain
Host Zones
A container for records defining how traffic is routed to a domain and its subdomains
Public: Specify how to route traffic on the internet
Private: Specify how to route traffic within one or more VPCs
Pay $0.50 per month per hosted zone
Records TTL
High TTL (ex. 24 hr): Less traffic on Route 53 and possibly outdated records
Low TTL (ex. 60 sec.): More traffic on Route 53, records are outdated for less time and easy to change
Mandatory for each DNS record except for Alias records
CNAME vs. Alias
CNAME: Points a hostname to any other hostname, only for non-root domain
Alias: Points a hostname to an AWS resource
Works for root and non-root domains
Free of charge with native health check
Alias Records
Map hostname to AWS resource
ELB, CloudFront distributions, API gateway, Beanstalk environments, S3 websites, VPC interface endpoints, Global Accelerator accelerator, Route 53 record in same hosted zone
Can't set for an EC2 DNS name
Extension to DNS functionality, automatically recognizing changes in the resource's IP address
Can be used for the top node of a DNS namespace unlike CNAME
Always of type A or AAAA for AWS resources
Can't set TTL
Routing Policies
Defines how Route 53 responds to DNS queries
Routing policies:
Simple:
Route traffic to single resource
Specify multiple values in same record, client randomly chooses a value if multiple are returned
No associated health checks
Weighted:
Control percentage of requests that go to each specific resource
DNS records must have same name and type
Associated health checks
Useful for load balancing between regions and testing new app versions
Latency-based:
Redirect to resource with lowest latency to the user
Failover
Geolocation:
Routing based on user location
Associated health checks
Multi-Value:
Routing traffic to multiple resources, Route 53 will return multiple values/resources
Associated health checks, returning only values for healthy resources
Up to 8 healthy records returned for each Multi-Value query
Geoproximity:
Route traffic based on geographic location of users and resources
Shift more traffic to resources based on defined bias
Must use Route 53 Traffic Flow to use this feature
IP-based:
Routing based on clients' IP addresses
Provide a list of CIDRs for clients and the corresponding endpoints/locations
Useful for optimizing performance and reducing network costs
Health Checks
HTTP health checks only for public resources
Integrated with CloudWatch metrics
Monitoring an endpoint
Approx. 15 global health checkers check endpoint health, if > 18% of health checkers report the endpoint is healthy then Route 53 considers it healthy
Pass only when endpoint responds with 2XX or 3XX status codes
Can be setup to pass / fail based on text in the first 5120 bytes of the response
Configure router/firewall to allow incoming requests from health checkers
Calculated health checks
Combine results of multiple health checks into a single check using OR, AND or NOT
Monitor up to 256 child health checks
Private hosted zones
Health checkers are outside the VPC, they can't access private endpoints
Can create a CloudWatch metric and associate an alarm, then create a health check that checks the alarm itself
Domain Registrar vs. DNS Service
Buy or register domain name with a Domain Registrar by paying annual charges
The Registrar usually provides you with a DNS service to manage DNS records
For 3rd party registrar:
Create hosted zone in Route 53
Update NS Records on 3rd party website to use Route 53 Name Servers