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

Get Started
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. Once the EC2 instance is up and running, copy the public IP address to use later.

    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:

    https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html

    Another option is to use the Windows Subsystem for Linux:

    https://docs.microsoft.com/en-us/windows/wsl/install-win10

    ===

  4. Connect to the EC2 instance using SSH, and run the following commands:

    sudo yum update -y
    sudo yum install -y httpd
    sudo service httpd start
    sudo chkconfig httpd on
  5. Open a new browser tab, and paste in the copied public IP address to verify our web server is up and running.

Create Record Sets

First Record Set

  1. Navigate to Route 53 in the AWS console.
  2. Click Hosted zones.
  3. Select the listed zone.
  4. Update: The AWS Portal has changed. Choose "Create record"
  5. Choose "Simple routing"
  6. Choose "Define simple record"
  7. In "Value/Route traffic to" choose "IP address or another value depending on the record type"
  8. Enter the public IPv4 address of your EC2 instance.
  9. Click "Define simple record"

Second Record Set

  1. Choose "Define simple record" to create a 2nd record
  2. Put www in for the Record name
  3. In "Value/Route traffic to" choose "IP address or another value depending on the record type"
  4. Enter the public IPv4 address of your EC2 instance.
  5. Click "Define simple record"
  6. Choose "Create records"
  7. After a few minutes, open a new browser tab and paste in the domain names for both record sets we created. They should both result in the Linux Apache test page.

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:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html

Another option is to use the Windows Subsystem for Linux:

https://docs.microsoft.com/en-us/windows/wsl/install-win10
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 $399 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.


$1,995.00

Checkout
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?