Managing DNS Records with AWS Route 53

45 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this live AWS environment you will learn how to create and manage DNS records inside of Route 53. You’ll start by creating a simple application. It will serve as a test website from two EC2 instances, and will route traffic using an Application Load Balancer ELB. After this, you will create two records inside a Route 53 hosted zone that will configure the DNS settings for a custom domain and point it to your application.
Further, you’ll look at how DNS works in this scenario (and in general) and how a command line utility like `dig` can get more information about a domain. These skills will allow you to associate many kinds of AWS web applications with recognizable web domains such as **.

Here is a code snippet we’ll need for this lab:
yum update -y
yum install -y httpd
cp /usr/share/httpd/noindex/index.html /var/www/html/index.html
service httpd start

_PLEASE ENSURE YOU USE THIS SNIPPET_ otherwise the ELB healthchecks will fail.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create Two EC2 Instances

Inside of the AWS console, create two EC2 instances that you can later attach to an Elastic Load Balancer. Follow these steps for the creation process:

  • Navigate to the EC2 portion of the console
  • Press Launch Instances
  • Pick an Amazon Linux AMI
  • Select the T2 Micro free tier eligible instance type
  • On the Configure Instance step make sure that the Linux Academy VPC is selected
  • Make sure to select a different subnet for each of the two instances
  • Make sure to change Auto-assign Public IP address to Enable
  • Add a User Data Script under the advanced details section (see the description of this activity for the code you need)
  • Press Next a few times until you get to the Confiure Security Group step
  • Create two instances:
    • Create a new security group and add HTTP access to the security group
    • Make sure to select the security group you just created for the previous instance
  • Press Next and press the button to launch the instance (you will have to create a keypair to do this step)
  • Repeat these steps again, but make sure to note the differences between the first and second instance’s creation process here
Create an Elastic Load Balancer

Create an Elastic Load Balancer in the AWS console:

  1. Navigate to the Load Balander section of the EC2 console
  2. Press Create load balander
  3. Select Application load balancer
  4. Give the load balancer a name
  5. Make sure to include the two Availability zones for this load balancer
  6. Skip over the Configure Security Settings step
  7. On the Configure Security Groups step create a new security group with the defaults
  8. On the Configure Routing step make sure you select New target group and name your target group
  9. Under Advanced health check settings set Healthy Threshold to 2
  10. Wait a few minutes, then test out your new ELB from the DNS name provided under the ELB’s description in the EC2 console
Create Route 53 Record Sets

Create two aliased A Records inside the Route 53 hosted zone you are provided that point to the Elastic Load Balander domain:

  1. Navigate to the Route 53 portion of the console
  2. Enter the hosted zone for the custom domain you are provided
  3. Press the Create Record Set button and select the A – IPv4 Address type
  4. Make sure Alias is selected as Yes
  5. Find your Elastic Load Balancer domain in the dropdown, select that and then press Create down at the bottom of the page
  6. Repeat this process except make sure to enter www in the Name for one of the two records, so that you have an A record for the www subdomain too

Additional Resources

Make sure that when you eventually navigate to the Route 53 hosted zone the only DNS records you see are the NS and SOA records - if there are others there you can delete them.

User Data code snippet for this lab:

yum update -y
yum install -y httpd
cp /usr/share/httpd/noindex/index.html /var/www/html/index.html
service httpd start

PLEASE ENSURE YOU USE THIS SNIPPET otherwise the ELB healthchecks will fail.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


Sign In
Welcome Back!
Thanks for reaching out!

You’ll hear from us shortly. In the meantime, why not check out what our customers have to say about ACG?