Route53 is the DNS service offered by Amazon Web Services. Route53 is composed by hosted zones. Each hosted zone is a collection of resource records sets.
Alias Resource Record Sets
Alias resource record sets is a specific extension to standard DNS functionality provided by Route53. Instead of using standard CNAME entries, using Alias Resources is advantageous because:
- Save time because Route53 automatically recognizes changes in the resource record sets that the alias resource record set refers to. If the IP address of the load balancer changes, Amazon Route 53 will automatically reflect those changes in DNS answers.
- They are not counted as chargeable Route 53 requests so they are free.
Use Alias resources (instead of the usual CNAME entry) to point to resources as:
- An Elastic Load Balancer
- An Amazon S3 bucket that is configured as a static website
- Another record in the same DNS zone with Amazon Route 53
- An alternate domain name for a CloudFront distribution
In this example we set up an alias record set responding to an ELB:
A private hosted zone is a container that holds information about how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs). Typically we have to use internal ELBs together with private hosted zones to route traffic inside your VPC. To route traffic from internet then we have to use public hosted zones with public ELBs.
For example, imagine that we have one ELB responding to example1.com and another one responding to example2.com. There are requests from internet to both sites but because of dependencies between them we have to route internal traffic between them too. In that case we have to create two private zones for the VPC with two internal ELBs and two public zones with two public ELBs.
In this example we create an internal ELB, a private hosted zone and an alias record set for "example.com":