Front-end Tutorials

Front-end Tutorials

HTMLCSSSassJavaScriptReactJS
CMS Tutorials

CMS Tutorials

WordPress
Tutorials expand

Exploring AWS Route 53

Posted in AWS Tutorial
Updated on Sep 22, 2024
By Mari Selvan
👁️ 49 - Views
⏳ 4 mins
💬 1 Comment
Exploring AWS Route 53

Photo Credit to CodeToFun

🙋 Introduction

Amazon Route 53 is a scalable and highly available domain name system (DNS) web service provided by Amazon Web Services (AWS).

In this tutorial, we will explore the key steps of using Route 53, including buying a domain, creating a hosted zone, and configuring an Application Load Balancer.

📚 Prerequisites

Before you begin, ensure you have an AWS account and access to the AWS Management Console.

💵 Buying a Domain

Let's explore the process of purchasing a domain name on AWS.

  1. Navigate to the AWS Management Console and sign in.

  2. Open the Route 53 console and click on Register a domain.

    Open Route 53

    Photo Credit to CodeToFun

  3. Enter the desired domain name and select the TLD (Top-Level Domain), such as .com or .net.

  4. Follow the prompts to complete the domain registration process.

🖋️ Creating a Hosted Zone

Follow these steps to create a Hosted Zone.

  1. In the Route 53 console, choose Hosted zones from the navigation pane.

    Navigate to AWS hosted zone

    Photo Credit to CodeToFun

  2. Click on Create Hosted Zone.

    Create Hosted Zone

    Photo Credit to CodeToFun

  3. Configure the hosted zone as follows.

    1. Domain name: Enter the domain name that you purchased earlier.
    2. Description: This is optional.
    3. Type: Choose Public hosted zone.
    Configure Hosted Zone

    Photo Credit to CodeToFun

  4. Now, click on the create hosted zone button

  5. Congratulations! We have successfully created the hosted zone.

    hosted zone created successfully

    Photo Credit to CodeToFun

  6. Copy the four Name Server (NS) values from the hosted zone and paste them into your registered domain name settings (in this case, quizarmy.com).

    Change Domain Name Server

    Photo Credit to CodeToFun

Congratulations! We have successfully created and configured a hosted zone for our domain name.

🔧 Configuring EC2 to Domain Name

You can configure either your EC2 instance to the domain via a hosted zone or your Application Load Balancer to the domain via a hosted zone.

Note: Skip this section if you want to configure an Application Load Balancer for your domain.

In this section, we will learn how to configure an EC2 instance to connect to the domain via a hosted zone.

  1. Go to Hosted Zone and then click on Create Record.

    Hosted Zone Create Record

    Photo Credit to CodeToFun

  2. Create a CNAME record type for our domain.

    In my case, I will create a CNAME record for quizarmy.com.

    Creating a CNAME record with the record type www.quizarmy.com and the value quizarmy.com means that the www subdomain is being aliased to the main domain.

    Create CNAME in hosted zone

    Photo Credit to CodeToFun

    Now, click on Create records.

  3. Create A type record for our domain as follows:

    1. Record name: Leave it blank.
    2. Record type: A – Routes traffic to an IPv4 address and some AWS resources.
    3. Alias: No (switch off the checkbox).
    4. Route traffic to: Public IPv4 address of your EC2 instance.

    Now, click on create records

    Create A type record in hosted zone

    Photo Credit to CodeToFun

Congratulations! We have successfully configured our EC2 instance for the Hosted Zone.

🔧 Configuring Application Load Balancer to Domain Name

You can configure either your Application Load Balancer to the domain via a hosted zone or your EC2 instance to the domain via a hosted zone.

Note: Skip this section if you want to configure an EC2 instance for your domain.

In this section, we will learn how to configure an Application Load Balancer to connect to the domain via a hosted zone.

  1. Go to Hosted Zone and then click on Create Record.

    Hosted Zone Create Record

    Photo Credit to CodeToFun

  2. Create a CNAME record type for our domain.

    In my case, I will create a CNAME record for quizarmy.com.

    Creating a CNAME record with the record type www.quizarmy.com and the value quizarmy.com means that the www subdomain is being aliased to the main domain.

    Create CNAME in hosted zone

    Photo Credit to CodeToFun

    Now, click on Create records.

  3. Create A type record for our domain as follows:

    1. Record name: Leave it blank.
    2. Record type: A – Routes traffic to an IPv4 address and some AWS resources.
    3. Alias: Yes (switch the checkbox).
    4. Route traffic to:
      • Alias to Application and Classic Load Balancer
      • your-hosted-region
      • your-dns-name
      .

    Now, click on create records

    Create A type record in hosted zone

    Photo Credit to CodeToFun

Congratulations! We have successfully configured our Application Load Balancer for the Hosted Zone.

🕵️‍♂️ Testing the Configuration

Let's test whether our domain quizarmy.com is working perfectly or not by following the steps below:

  1. Open a web browser and enter your domain name
  2. Kudos! Our domain name is operational and serving our application through either an Application Load Balancer or an EC2 instance.

    Domain name serving successfully

    Photo Credit to CodeToFun

🎉 Conclusion

Congratulations! You've successfully explored AWS Route 53, including buying a domain, creating a hosted zone, and configuring an Application Load Balancer and EC2 instance.

This setup allows you to efficiently manage your domain and distribute incoming traffic across multiple instances or services.

Remember to adjust security settings and optimize configurations based on your specific requirements.

🤯 Fun Fact

Logo

Did you Know?

It may take up to 24 hours to change the name servers for the domain.

👨‍💻 Join our Community:

To get interesting news and instant updates on Front-End, Back-End, CMS and other Frameworks. Please Join the Telegram Channel:

Author

author
👋 Hey, I'm Mari Selvan

For over eight years, I worked as a full-stack web developer. Now, I have chosen my profession as a full-time blogger at codetofun.com.

Buy me a coffee to make codetofun.com free for everyone.

Buy me a Coffee

Share Your Findings to All

Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Mari Selvan
Mari Selvan
9 months ago

If you have any doubts regarding this article (Exploring AWS Route 53), please comment here. I will help you immediately.

We make use of cookies to improve our user experience. By using this website, you agree with our Cookies Policy
AgreeCookie Policy