AWS Route 53 – Basics

Introduction

Route 53 is AWS’ very own core DNS offering.

Its is a highly available and scalable Domain Name System (DNS) web service.

While building Route 53, AWS main goal was to build a system that could survive beyond five nines of availability (99.999%) and it seems like AWS has achieved it.

You can use Route 53 to perform three main functions in any combination:

  • Domain registration
  • DNS routing
  • Health checking

Along with standard DNS services, Route 53 also includes the ability to purchase and transfer domains to and from other registrars.

When you register a domain name using Route 53, it creates what’s called a public hosted zone (a public hosted zone is simply where DNS records for the domains are stored). You can create public hosted zone only for the domain, you own.

Private Hosted zones are not visible to public and they attached to AWS VPC. Multiple VPCs (even in different accounts) can be associated to a private hosted zone.

If you are getting started with a new domain, Route 53 is a good place to start.

But, before we go into Route 53 details, lets cover few DNS basics first.

What is a Domain

A domain is basically a human readable address for a specific network resource.

How do we get a domain?

Well, domains can be purchased just like any other store bought products. They are purchased from a domain registrar. So it just happens that AWS Route 53 is a domain registrar.

What is DNS

DNS, the domain name system, is the glue that holds the internet together.

DNS creates a mapping between an easy-to-remember name and a hard-to-remember IP Address. Also, you can think of DNS as a database:

Domain NameResource TypeResource Data
example.comA (IP Address)93.184.216.34

These 3 elements are part of Resource record.

nslookup is a well known utility to query a name server for resource records.

Route 53 – Domain Registration

Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service. It is designed to give developers and businesses an extremely reliable and cost effective way to route end users to Internet applications by translating names like www.example.com into the numeric IP addresses like 192.0.2.1 that computers use to connect to each other.

Register a Domain

When you register a new domain name with Route 53, it does almost all of the hardwork for you:

  • Creates a public hosted zone for the domain.
  • Update the domain registry with route 53 entries.

You can Register a domain using Register Domain service on the web Route 53 Dashboard.

Next choose a domain name, Provide Contact Details, Verify and Purchase:

Minutes later, you can see that domain is showing in registered domains area and a hosted zone is also setup:

Next, lets see a very basic demo to use this domain for a static website in AWS S3 bucket.

Demo – Use your domain for a static website in an Amazon S3 bucket

Following are the steps for this demo:

  1. Register a domain name, such as awsclouddemos.com
  2. Create an Amazon S3 bucket and configure it to host a website
  3. Create a sample website and save the file in your S3 bucket
  4. Configure Amazon Route 53 to route traffic to your new website

We have already covered the 1st item in previous section. For 2nd and 3rd items You can follow this post, which will show you how to setup a static website by configuring an S3 bucket using AWS CLI.

(Note: S3 bucket name shall match the domain you register e.g. in our demo bucket name is awsclouddemos.com, same as the domain we registered earlier)

at this point, we have a domain registered and we have hosted a static website:

http://awsclouddemos.com.s3-website.eu-central-1.amazonaws.com/

Only thing remaining is the item 4 i.e. Configure Amazon Route 53 to route traffic to our new website. Lets do this in next section.

Route DNS traffic for your domain to your website bucket

Lets navigate to domain under Hosted Zones in Route 53 web console:

You may see couple of records. Now, click Create Record button on the page, which will start with the process, select switch to wizard option:

Choose Simple Routing:

Selecting simple routing option for routing policy and select Next:

In next page, chose Define simple record as shown below:

Click Define simple record button and it will show the following dialog,

As shown in the image above, we choose Record type (A) and Value to S3 website endpoint for routing traffic, Region and then target S3 bucket which host the static website. Click Define simple record button.

We can see in following picture that A record is added.

Click Create records button.

Verify Results

With all this done, lets try to visit the URL of the domain name we registered earlier:

http://awsclouddemos.com/

Summary

In this post, we learned the basics of Route 53. We saw how easy it is to register a domain using this service and then configure it to use it with a static web site.

We will cover this service more in some upcoming posts.

Let me know if you have some comments or questions. Till next time, Happy Coding.