Pages tagged hosts:

Tim Dysinger ยป Using Amazon EC2 Metadata as a Simple DNS
http://dysinger.net/2008/10/13/using-amazon-ec2-metadata-as-a-simple-dns/

Using Amazon EC2 Metadata as a Simple DNS
I use the amazon metadata for creating /etc/hosts and do this on a cron schedule. This does everything I need. Instead of fancy DynDNS tricks or having to run and manage an internal DNS server I just have a ruby script that looks at the metadata ec2 to build /etc/hosts. It's easy. To set it up yourself and try it all you need are 3 easy steps. Step 1- Start each of your instances with unique named key that matches what you want their internal hostname to be. Such as "onion" or "potato" or whatever you want to call them. Step 2- Make sure you have ruby, rubygems and amazon-ec2 (rubygem) installed. Then create a ruby script in /usr/local/sbin/hosts that has the following:
"I use the amazon metadata for creating /etc/hosts and do this on a cron schedule. This does everything I need. Instead of fancy DynDNS tricks or having to run and manage an internal DNS server I just have a ruby script that looks at the metadata ec2 to build /etc/hosts."