Lab complete!
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool
Having configured the safety rules and routing controls, we’re going to tie it all together with a Route 53 private hosted zone. We’re using a private hosted zone for this lab to avoid provisioning a public domain name, however the steps for setting up a public hosted zone for Route 53 are similar, but do check the Route53 Developer Guide documentation. There are specific considerations you need to take into account when working with public hosted zones and private hosted zones on Route 53, and you can learn more about them in the documentation for Working with hosted zones.
First, click Route 53 Hosted zones to Click “Create hosted zone” to get started:
Next, give your private hosted zone a name (e.g. unicorns.magic
because unicorns are, of course, magical), add an optional description, and ensure that for Type, you select the Private hosted zone radio button:
Then, we’ll need to associate our private hosted zone with the unicorn VPCs in N. Virginia (us-east-1) and N. California (us-west-1). First select the N. Virginia (us-east-1) region in the Region pulldown, and select the VPC labelled hot-primary (the lab VPCs have been configured to enable DNS hostnames and DNS support already):
Then, click Add VPC, and select the hot-secondary VPC in N. California (us-west-1), and click Create hosted zone to complete:
Click Create record to get started:
We’ll start by creating the primary record for the application. Give the record the name application
and:
us-east-1-ALB
.Now let’s add another record for the secondary endpoint - click “Add another record”:
We’ll now repeat the process to set up the entry for the ALB in N. California (us-west-1). For the second record, use the same record name, application
, for the subdomain. The following steps will be similar to what we did for the previous record:
us-west-1-ALB
and click Create records.Once complete, you should see the two new zone records for application.unicorns.magic in the Route 53 private hosted zone. This record aggregates the application entry points, represented by the Application Load Balancers in each region, and we will be able to route traffic to our East and West cells, or both, using our routing controls:
We’re going to call our “front-door” domain name shop.unicorns.magic. We’ll create the maintenance record first. Create a hosted zone record with shop
as the subdomain name:
www.example.com
into the Value sectionMaintenance
.Please note, Route 53 requires that records in a zone with the same subdomain are of the same type. This will cause two DNS queries from a client, so for a production deployment, you may wish to route your traffic to an AWS Alias or A record, or a AAAA IP address record, instead. The CNAME is used for this example for illustrative purposes.
Once complete, click Add another record:
Then, configure another shop
subdomain for the application endpoint:
application.unicorns.magic
into the Value section.Application
.Again, please note that for production purposes, using a CNAME record like this will result in two DNS queries for the client. For more information on how Route 53 is configured to return records in the same hosted zone, please see the Route 53 documentation here.
Once complete, click Create records:
You now should have all the Route 53 private hosted zone records configured, and can move on and activate the routing for the application:
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool