Public Hosted Zones – Hybrid and Multi-account DNS – ANS-C01 Study Guide

Public Hosted Zones

Public hosted zones are created to deliver name resolution and other Route 53 DNS services on the Internet. In Route 53 a public zone routes traffic on the Internet for a specific domain.

For Internet-based DNS queries, the public hosted zone is used. A public hosted zone contains your defined instructions about how you want to direct traffic on the Internet to your domain by defining records. When a public zone is created, Route 53 will automatically create the Name Server (NS) and Start of Authority (SOA) records for you, and you must create the specific resource records needed for your domain. Figure 3.3 shows the fields required to create a public hosted zone in the Route 53 web console.

FIGURE 3.3 Route 53 public hosted zones

Traffic Management

Route 53 traffic management features let you control how traffic gets routed to your service endpoints. Route 53 supports a number of traffic policies that are used to affect the traffic by returning an IP address based on a policy you define.

By creating policies, you can affect the IP address that Route 53 returns from a query. Traffic policies are used for traffic management and are a set of rules and endpoints that are created by you and applied to the domain name. You can also create a single policy and apply it to more than one domain name.

The policy is the name of the container that contains all of the configurations. The traffic policy record is the domain name with a policy applied to it.

To configure a traffic policy, select Traffic Policies on the left pane of the Route 53 console to open the visual editor, as shown in Figure 3.4. You start by entering a policy name that is user-friendly and easy to understand. The policy name will appear in the console when the policies are listed, and you cannot change the name after it has been created. The version number will be automatically assigned by AWS. The version description allows you to document any changes or notes about this version and will appear in the console when the traffic versions are listed. Click Next, and the Traffic Policy Editor will appear. The DNS Type field is the starting point and lists many of the record types that you can select to configure. If you are connecting to an AWS service such as CloudFront, S3, or an elastic load balancer, use its IP address (A record). The next step is to define what you are connecting to; here you define the failover rules, a geolocation, latency, multivalue, and weighted, an endpoint, and an existing rule or endpoint. Next is the Value type where the options include CloudFront, an ELB, an S3 website, or a DNS type value. Based on your selection, follow the graphical interface configuration steps to fill out the information to complete the traffic policy creation process.

FIGURE 3.4 Traffic policy editor

If you need to update a policy, you can edit an existing policy and AWS will automatically update the version number with the policy name staying the same. The older version will be retained, and you can decide to delete it if it is no longer needed.

Traffic policies can also be defined by creating a JSON document and importing it into the policy editor. Follow the online documentation for how to format the JSON file.

There is a lot of flexibility available to you when defining a policy. In this section, we will use a standard A record that points to an EC2 instance with an attached elastic IP interface, as shown in Figure 3.5. However, note that traffic policies can be applied to any type of record, and the options may be different. Please refer to the online documentation for the specifics of how to work with the different types of policies.

Using the web graphical interface, you build your policy and then apply it when finished. The first step is to define the DNS policy name of the area labeled “Start point.” This is usually an A record, the IP address, or a CNAME that points to another domain name. The next step is to define how you want to connect, which can be either weighted, failover, geolocation, latency, multivalue, geo-proximity, or a new endpoint. Then click Create.

FIGURE 3.5 Traffic policy creation step 1

Figure 3.6 shows the final step of creating the policy. After the policy has been created, it will be applied and take immediate effect.

FIGURE 3.6 Traffic policy creation step 2

The policies are versioned so you can roll backward or forward as needed and track changes to your policy configurations. All previous versions are automatically saved and can be manually deleted if they are no longer needed.