Networking : Route 53 -- Overview

 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

In Amazon Web Services (AWS), a "router" generally refers to a networking device that forwards data packets between different networks, such as between your Virtual Private Cloud (VPC) and the internet or between different VPCs. AWS provides several networking services that perform routing functions:

Amazon VPC Route Table:

An Amazon Virtual Private Cloud (VPC) is a logically isolated section of the AWS Cloud where you can launch resources. Each VPC has a default route table, and you can create custom route tables. Route tables define how network traffic is directed within the VPC and to destinations outside the VPC, such as the internet.

Amazon Internet Gateway (IGW):

An Internet Gateway allows resources within your VPC to access the internet, and it enables incoming internet traffic to reach resources within your VPC. It's used to connect your VPC to the public internet.

Amazon Virtual Private Gateway (VGW):

A Virtual Private Gateway is used to establish a secure and private connection between your on-premises network and your VPC using a Virtual Private Network (VPN) or AWS Direct Connect.

Amazon NAT Gateway:

A Network Address Translation (NAT) Gateway allows private resources within your VPC to access the internet while preventing inbound traffic from reaching those resources. It's often used in scenarios where resources need to initiate outbound connections but shouldn't be directly accessible from the internet.

VPC Peering:

VPC peering allows you to connect two VPCs together, enabling communication between them using private IP addresses. Peering does not require a dedicated router but instead routes traffic between VPCs directly.

Transit Gateway:

The AWS Transit Gateway is a hub that simplifies network architecture by enabling centralized connectivity between VPCs, on-premises networks, and other AWS services.

These AWS networking services handle the routing of network traffic between different networks and resources, providing the functionality that is commonly associated with routers in traditional networking environments.

When working with these services, you'll configure routing tables, route entries, and gateways to control how traffic is directed within your AWS environment. The specific setup and configuration depend on your networking requirements and the architecture of your applications. Always refer to the official AWS documentation for detailed guidance on setting up and managing networking and routing in AWS.


ROUTE 53 :

What is DNS ?






To register a domain with Route 53, you will need to manually register the domain through the AWS Management Console or using the AWS CLI. Once the domain is registered, you can use Terraform to manage DNS records within the Route 53 hosted zone associated with that domain.

Here is a general outline of how you can achieve this:

  1. Register the Domain Manually: Use the AWS Management Console or the AWS CLI to register the domain with Route 53.

  2. Create a Hosted Zone in Terraform: Once the domain is registered, you can use Terraform to create a hosted zone in Route 53. This hosted zone will allow you to manage the DNS records for your domain.

  3. Add DNS Records in Terraform: With the hosted zone created, you can use Terraform to define and manage DNS records such as A records, CNAME records, and more.

Here's an example of how you might use Terraform to create a hosted zone and add DNS records after you have registered the domain:

provider "aws" {
  region = "us-east-1"  # Change to your desired AWS region
}

resource "aws_route53_zone" "example_zone" {
  name = "example.com"
}

resource "aws_route53_record" "example_a_record" {
  zone_id = aws_route53_zone.example_zone.zone_id
  name    = "www.example.com"
  type    = "A"
  ttl     = 300
  records = ["your_server_ip"]
}



  • You need to replace "your_server_ip" with the actual IP address you want to associate with the DNS record.
  • The aws_route53_zone resource creates a hosted zone for the domain "example.com."
  • The aws_route53_record resource creates an A record that associates the subdomain "www.example.com" with the specified IP address.

Please note that this example assumes you have already registered the domain with Route 53 using the AWS Management Console or CLI. You can then use Terraform to manage DNS records within the Route 53 hosted zone.

Always refer to the latest Terraform documentation and AWS documentation for accurate and up-to-date instructions. Additionally, check if AWS has introduced any new services or integrations related to domain registration since my last update in September 2021.


In Route 53 you are going to define a bunch of DNS records and these records define how you want to route traffic to a specific domain.


you pay $0.50 per month for hosted zone .

89 : Route 53 : Registering a Domain.

Register a domain is same as godaddy . search for a domain and register a domain.

90: Create our first record in Route53 :

Added a A record with an ip address: when we use the ip address on the browser it does not work for there is no such ip address yet.

Now we go to cloud shell and install -dig" and nslookup 

sudo yum install -y bind-utils

This will install both the nslookup and dig on my cloud shell. 

Now this is what we added to the dns records.

Let us use the dig command 


This will have the an answer section : It shows it has a A record and the value of the record. However we cannot browser the server from the browser yet. we will look into it in the next lecture.

Before we goahead and before we use Route 53 we will create 3 EC2 instance in three different regions along with an ALB.



Now we have 3 EC2 Instances started from three different regions . 

And we will create 

1. frankfurt
2. Northern Virginia
3. Singapore

we will build a load balancer now in frankfurt .

92 . Route 53 : TTL  - Time to Live

A record TTL is the time to live

TTL, which stands for "Time to Live," is a value associated with DNS (Domain Name System) records that specifies how long the information in that record should be considered valid and cached by resolvers (such as DNS servers and clients). When a DNS resolver queries a DNS server for a particular domain's information, it receives not only the requested data but also the associated TTL value.



Routing Policies for route 53 :











100 : Routing Policy GeoLocation




102: Routing Policy : Traffic Flow and Geo-proximity


103: Routing Policy IP Based :


104: Routing Policy : Multi Value



Registered your domain in GoDaddy but using Route 53 to route traffic by giving Route53 nameservers







Comments

Popular posts from this blog

Apache Airflow : AWS

AWS : S3

Network- Route53 : Interview Question