21

I am getting started on understanding VPC but am not seeing a good internal DNS solution. For example, we're using a non-RDS database server which other servers in the VPC connect to. I would like to connect by name, not IP. Partly this is so I can get an internal 10.x.x.x address, which is presumably faster. Mostly, it makes configuration easier, more legible, and more flexible.

In the olden days (circa 2008), pre-VPC I had a server that ran MaraDNS which we would update as we started and changed instances, and this was a big pain, in particular because servers would get their own DHCP-assigned internal addresses when they restarted, and just because it was another thing to deal with. Some colleagues of mine running different systems thought I was an idiot for going to all this effort -- they just updated the /etc/hosts files (which was great until there was an outage and all their servers came back with new IPs).

Should I be looking at Route53 (where we're doing all our public DNS) or is there something I am missing?

Update: 2017 -- Internal DNS is now a feature of Route 53. Woot!

3 Answers3

6

It seems from the AWS VPC documentation that the recommended approach to leveraging a DNS server inside of an AWS VPC is to first create a DHCP Options Set and associate it with the VPC. Then you can stand up 1-4 DNS servers in that VPC. Additionally, the DHCP Options Set will allow you to setup the following for all contained VPC instances. (snipped from the docs)

DHCP Option Name      | Description
 domain-name          |  A domain name of your choice (for example, example.com).
 domain-name-servers  |  The IP address of a domain name server.
 ntp-servers          |  The IP address of a Network Time Protocol (NTP) server. 
 netbios-name-servers |  The IP address of a NetBIOS name server.
 netbios-node-type    |  The NetBIOS node type (1, 2, 4, or 8).
Oort
  • 61
5

Instances should register their DNS names with your DNS servers via DDNS when they start (as CNAMEs to their public AWS-assigned FQDN); that way you can refer to them by well-known name and get the most appropriate address (internal or external) regardless of where you are. Route53 probably has this sort of magic built-in, but I prefer provider-independent solutions where possible.

womble
  • 98,245
4

Wouldn't something like Avahi work? This is even installed and nicely packaged for most Linux distributions. Just give each instance that needs to be reachable a unique hostname, and Bob's your uncle.

Michael Hampton
  • 252,907