How to use Route53 to manage DNS records

In this post, I will walk you through another awesome service of AWS i.e Route 53. You might have a question popping in your mind, why it is called Route 53. It is because DNS listens on port number 53. To know more about DNS, visit this article by WebHostingGeeks.

I assume that you have your domain with you and ready to create records. I am taking an example of mys3example.com domain, replace it with the your domain. To test things out, I am using the same webpages which I had used to host a website on S3.

Login to Amazon console and click on Route 53 under Storage & Content Delivery.

First step is to create a Hosted Zone. Follow the below screenshot to create one.

After creating the DNS you will notice that NS and SOA records gets populated automatically. I am not going to cover these in detail here as this a different topic all together. Just in case you have flies in your stomach, you can read more about DNS records from this link.

Here, the different nameservers (usually four) defined in NS record is something you will have to consider. These needs to be updated with your domain name registrar. I am with GoDaddy, so I have updated the nameservers on their console. GoDaddy console was easy, but if you have problems updating it give a call to your registrar and they will do it for you.

Here are my AWS DNS servers updated with GoDaddy. I have deliberately blacked out the portions which I do not want to share.

NOTE: Usually Route 53 records are active almost instantaneously, but a new domain takes sometime to respond to dig(Linux) or nslookup(Linux/Windows) queries.

You can check whether AWS Route 53 has created records for you using the below command. You can specifically query any one the nameservers and it will display the rest (three) of the nameservers too.

$ dig mys3example.com @ns-591.awsdns-09.net +nostats +nocomments +nocmd

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> mys3example.com @ns-591.awsdns-09.net +nostats +nocomments +nocmd ;; global options: +cmd ;mys3example.com. IN A mys3example.com. 60 IN A 54.231.2.76 mys3example.com. 172800 IN NS ns-1249.awsdns-28.org. mys3example.com. 172800 IN NS ns-2045.awsdns-63.co.uk. mys3example.com. 172800 IN NS ns-284.awsdns-35.com. mys3example.com. 172800 IN NS ns-591.awsdns-09.net. $

Create an A record. Since, I am using the same example from my last post, I have chosen a S3 Endpoint, you can choose as per your requirement.

Create a CNAME record. Again, this is the S3 endpoint (from www.mys3example.com S3 bucket) from my last post.

Similarly, you can create a MX records for your mail servers or any other records like TXT, PTR, etc.

This is not everything about Route 53, it is just a glimpse of this service. There is a lot more to learn. Amazon documents and whitepapers are the best source to learn about any service of AWS.

Feel free to shoot me with your queries and doubts. Thanks for reading.

comments powered by Disqus