Manage Amazon Route 53 using the AWS Management Console UI.
-
Log in to AWS Console:
- Open the AWS Management Console.
- Enter your credentials (username and password).
-
Navigate to Route 53:
- In the AWS Management Console, in the search bar, type "Route 53" and click on the Route 53 service.
A hosted zone is a container for DNS records, and it's required to manage the DNS for a domain.
-
Click on Hosted Zones:
- In the left-hand navigation panel, click on Hosted zones.
-
Create a Hosted Zone:
- Click the Create hosted zone button at the top.
-
Fill in the Hosted Zone Details:
- Domain Name: Enter your domain name, for example,
example.com. - Type: Choose Public hosted zone (since you want it to be accessible from the internet).
- Comment: Optional, you can leave this blank or add a comment.
- VPC: Leave it unassociated unless you want to associate it with a private VPC.
- Click Create.
Once created, you will see the hosted zone in your list, and it will have two default records:
- NS (Name Server) record.
- SOA (Start of Authority) record.
- Domain Name: Enter your domain name, for example,
Now that you have a hosted zone, you can add DNS records (such as A, CNAME, MX, etc.).
-
Click on the Hosted Zone:
- In the Hosted Zones section, click on your hosted zone (e.g.,
example.com).
- In the Hosted Zones section, click on your hosted zone (e.g.,
-
Click Create Record:
- At the top of the hosted zone, click Create record.
-
Choose Record Type:
- For this example, let’s create an A record (address record), which maps a domain to an IP address.
- In the Record type dropdown, select A – IPv4 address.
-
Fill in the Record Details:
- Record name: Enter the subdomain or leave blank to point to the root domain. For example, for
www.example.com, typewww. - Value: Enter the IP address (e.g.,
192.168.1.1). - TTL (Time to Live): Set the TTL (in seconds). A default of 300 seconds is often used.
- Routing policy: Choose Simple routing (default). This works for basic setups.
- Evaluate target health: Leave this option disabled unless you are setting up health checks.
- Click Create records.
You have now created an A record for
www.example.compointing to the IP192.168.1.1. - Record name: Enter the subdomain or leave blank to point to the root domain. For example, for
-
View Records:
- In the hosted zone view, you’ll see the new A record you created.
- If you added a subdomain, it will be listed as
www.example.com.
-
Edit a Record:
- To modify a record, click on the edit icon (pencil) next to the record.
- Update the Value, TTL, or other settings.
- After making changes, click Save changes.
You can create various types of records, such as:
-
CNAME Record (for aliasing another domain):
- Choose CNAME – Canonical name as the record type.
- Example:
www→example.com(if you wantwww.example.comto point toexample.com).
-
MX Record (for mail server routing):
- Choose MX – Mail exchange as the record type.
- Set the Value to the mail server address and priority.
-
TXT Record (for SPF or domain verification):
- Choose TXT as the record type and add a text value (e.g.,
v=spf1 include:spf.example.com ~all).
- Choose TXT as the record type and add a text value (e.g.,
Once the records have propagated (this can take some time), you can test them:
-
Using the Command Line:
- Open your terminal or command prompt.
- Run the following command to check the DNS resolution:
nslookup www.example.com
- This should return the IP address you configured.
-
Using Online Tools:
- Use online tools like DNSChecker to verify the propagation of your DNS records globally.
If you need to delete a DNS record:
-
Go to Hosted Zone:
- Click on your hosted zone in the AWS Route 53 console.
-
Delete a Record:
- Click the Delete button next to the record you want to remove (e.g.,
www.example.com). - Confirm the deletion.
- Click the Delete button next to the record you want to remove (e.g.,
Route 53 also offers health checks for your records. This is useful for ensuring that your website or server is up and running.
- Create Health Check:
- In the Route 53 console, click on Health Checks in the left sidebar.
- Click Create health check.
- Configure the health check (e.g., monitor if a web server is reachable on
http://www.example.com). - Link this health check to the relevant DNS record for automatic failover.
Amazon Route 53 provides multiple routing policies to handle traffic for your domain based on specific requirements. Below are examples and explanations for each routing policy with practical use cases.
This is the default routing policy, used to map a domain name to a single resource.
- Scenario: Map
example.comto a single EC2 instance. - Configuration:
- Record Type:
A - Value:
192.0.2.1(IP address of the EC2 instance)
- Record Type:
- A static website hosted on a single EC2 instance or an S3 bucket.
Distributes traffic based on weights assigned to multiple resources.
- Scenario: Distribute 70% of traffic to a primary server and 30% to a secondary server.
- Configuration:
- Record 1:
- Name:
example.com - Type:
A - Value:
192.0.2.1(Primary server) - Weight:
70
- Name:
- Record 2:
- Name:
example.com - Type:
A - Value:
192.0.2.2(Secondary server) - Weight:
30
- Name:
- Record 1:
- A/B testing or phased migration between different application versions.
Routes traffic to the resource with the lowest network latency based on the user’s location.
- Scenario: Serve users from the nearest region:
- US-East (Virginia) for North American users.
- AP-Southeast (Singapore) for Asian users.
- Configuration:
- Record 1:
- Name:
example.com - Type:
A - Value:
192.0.2.1(Virginia) - Region:
us-east-1
- Name:
- Record 2:
- Name:
example.com - Type:
A - Value:
192.0.2.2(Singapore) - Region:
ap-southeast-1
- Name:
- Record 1:
- Optimized user experience by reducing latency.
Routes traffic to a primary resource and redirects to a secondary resource in case of failure.
- Scenario: Use a primary EC2 instance and failover to a backup instance on failure.
- Configuration:
- Primary Record:
- Name:
example.com - Type:
A - Value:
192.0.2.1(Primary server) - Failover:
Primary - Health Check: Enabled
- Name:
- Secondary Record:
- Name:
example.com - Type:
A - Value:
192.0.2.2(Backup server) - Failover:
Secondary - Health Check: Enabled
- Name:
- Primary Record:
- High availability for critical applications.
Routes traffic based on the geographic location of the user.
- Scenario: Direct North American users to US servers and European users to EU servers.
- Configuration:
- Record 1:
- Name:
example.com - Type:
A - Value:
192.0.2.1(US server) - Location:
North America
- Name:
- Record 2:
- Name:
example.com - Type:
A - Value:
192.0.2.2(EU server) - Location:
Europe
- Name:
- Record 1:
- Regulatory compliance or content localization.
Routes traffic based on the geographic location of resources and optionally shifts traffic by bias.
- Scenario: Redirect most traffic to US servers but allow some traffic to EU servers using bias.
- Configuration:
- Set up Route 53 Traffic Flow.
- Use geoproximity with a bias of +10 for the US and -10 for the EU.
- Dynamic traffic shifting during events or regional promotions.
Allows multiple records and performs health checks for each to ensure only healthy resources are returned.
- Scenario: Provide IP addresses for multiple servers, but exclude unhealthy ones.
- Configuration:
- Record 1:
- Name:
example.com - Type:
A - Value:
192.0.2.1(Server 1) - Health Check: Enabled
- Name:
- Record 2:
- Name:
example.com - Type:
A - Value:
192.0.2.2(Server 2) - Health Check: Enabled
- Name:
- Record 1:
- Load balancing across multiple resources with health checks.
Route traffic based on IP match rules for hybrid on-premise and cloud deployments.
- Scenario: Forward DNS queries for
onprem.example.comto an on-premises DNS resolver. - Configuration:
- Create a resolver rule to forward queries for
onprem.example.comto the IP of the on-prem DNS resolver.
- Create a resolver rule to forward queries for
- Hybrid cloud setups with private DNS.
| Routing Policy | Use Case | Key Feature |
|---|---|---|
| Simple | Basic mapping | One-to-one mapping |
| Weighted | Load distribution | Distribute traffic by weight |
| Latency | Performance optimization | Routes to the lowest-latency resource |
| Failover | High availability | Routes to backup resource on failure |
| Geolocation | User-based routing | Routes based on user location |
| Geoproximity | Advanced geographic control | Bias-based traffic shifting |
| Multivalue Answer | Basic load balancing with health | Returns multiple healthy endpoints |