Assigning a FQDN (Fully Qualified Domain Name) to an EC2 Instance Using Route 53

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

In this hands-on lab, we will assign a fully qualified domain name to an EC2 instance using Route 53. Our first step will be to create an EC2 instance and set it up as a web server. Then, we will create two record sets in a provided hosted zone in Route 53. Finally, we will verify that the domain name is working by using the domain name to serve the newly configured web server.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create an EC2 Instance
  1. Create an EC2 instance, select the T2 micro free tier eligible instance type.
  2. Make sure to enable Auto-assign Public IP.
  3. Connect to the instance via a terminal.
  4. Install and launch the httpd service onto the instance.
  5. Open a new browser tab, paste in the copied public IP address to verify our web server is up and running by displaying the Apache splash page.
Create Record Sets
  1. Navigate to the Route 53 service.
  2. Create two records:
    • An A record that points to non-www version of the instance
    • Another A record that points to the www version of that instance
  3. Open a browser, visit the www version and non-www version of the instance via its domain name.

Additional Resources

Make sure you are in the N. Virginia (us-east-1) region.

Here is the code snippet for this lab:

sudo yum update -y
sudo yum install -y httpd
sudo service httpd start
sudo chkconfig httpd on

For Windows users: You can SSH into EC2 instances using PuTTY. For details on how to use PuTTY to connect to an EC2 instance, see:

Another option is to use the Windows Subsystem for Linux:

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.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?