I have a VPC on Amazon. Currently, it's running bind9 on one of the servers. It has records like this:

build           IN      A       172.aa.bb.cc
dev             IN      A       172.xx.yy.zz

This works fine, but in the interest of simplicity, I want to move its functionality to Amazon's Route53.

I've created a Private Hosted Zone on mydomain.local. I imported the db.mydomain.local file from bind9, and it created a few DNS records that look good to me. I noticed my records are added with the mydomain.local suffix, and I'd like them to still be available as shorthand (dev rather than dev.mydomain.local)

Next, I wanted to test if my configuration actually works. I stopped the bind9 service, and tried some nslookup commands, but those didn't seem to pick up the new config.

So, I have a few questions:

  • Do I need to configure something on my server(s) to pick up the Route53 config?
  • What is the easiest way to test this? I'm not at all familiar with nslookup or dig.

Any links to helpful documentation are also appreciated. I already read through Amazon's own documentation, but it doesn't seem to cover anything beyond creating the Private Hosted Zone itself.


Turns out you need to configure this in your VPC settings. Go to Services > VPC > DHCP Options Set and select the set with domain-name-servers = AmazonProvidedDNS.


Check what is the DNS server that is configured in /etc/resolv.conf file. This could be your old bind9 server. If your nodes are using DHCP then you might need to configure this in your DHCP server.

Regarding the short cut usage of dev for dev.mydomain.local you need to add search directive to resolv.conf

search mydomain.local

Once the search directive is added any host that is not FQDN will be tried resolving by adding the domain name at last. And so dev will be resolved as dev.mydomain.local.

Regarding the method to test this issue use dig. To check if Route53 is works fine you can specifically query Route53 delegation servers with @.

$ dig dev.mydomain.local @ns-1216.awsdns-24.org

Above command will query for dev.mydomain.local with ns-1216.awsdns-24.org DNS server. If you dont specify a @ option then the DNS provided in /etc/resolv.conf will be used for querying.

  • Thanks for pointing me in the right direction! This answers at least the shorthand from the search command, which is already in the config file you mentioned. It also contains a line nameserver <IP of bind9 server>, and a comment saying it shouldn't be edited manually. The dig command says couldn't get address for 'ns-1024.awsdns-00.org.': not found if the bind9 service isn't running. I used the address that's configured in the NS record of my Route53 config. – Jorn Jan 26 '15 at 15:59
  • If your nodes are using DHCP for IP address then you have configure DNS there. I am not sure about which nameserver you should be using for your network please refer docs.aws.amazon.com/Route53/latest/DeveloperGuide/Welcome.html. – Kannan Mohan Jan 26 '15 at 17:28
  • In terms of configuring DHCP, I added this "domain-name = eu-west-1.compute.internal zorotools.local domain-name-servers = AmazonProvidedDNS" on VPC's DHCP Options sets. Still short cut usage of dev for dev.mydomain.local does not work. It only works only after updating the record on /etc/resolv.conf. But I don't want to do this manually and it also states on this file "# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN". – mezi Sep 17 '15 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.