Amazon have recently launched their own DNS service called route53. Its a massively scaled DNS service that ties in nicely with things like EC2 and S3 but also handles the things you’d normally expect in a DNS server. The official line is:
Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service. It is designed to give developers and businesses an extremely reliable and cost effective way to route end users to Internet applications by translating human readable names like www.example.cominto the numeric IP addresses like 192.0.2.1 that computers use to connect to each other. Route 53 effectively connects user requests to infrastructure running in Amazon Web Services (AWS) – such as an Amazon Elastic Compute Cloud (Amazon EC2) instance, an Amazon Elastic Load Balancer, or an Amazon Simple Storage Service (Amazon S3) bucket – and can also be used to route users to infrastructure outside of AWS.
Currently there is no web interface to route53 and you access all the functionality via the API. There are some code examples to convert existing bind zones to a route53 XML request. However, I had major problems getting the perl example bindtoroute53.pl to work, mainly due to CPAN issues and Net::DNS::Zonefile not playing ball on Ubuntu 10.10 64bit. I didn’t have time to fiddle endlessly with perl and CPAN so I’ve rewritten the script in python and made it available so it can hopefully benefit someone else.
On ubuntu you need python installed and python-dnspython which is aDNS toolkit. You can install this by simply running
sudo apt-get install python-dnspython
Then just down the script from: http://media.squarecows.com/code/bindtoroute53.py and make it executable.
The script is pretty self explanatory you simply run the command by typing:
./bindtoroute53.py -z example.com > myrequest.xml
This will produce a file you can now use with the route53 API which will create new records for you.
Note: It doesn’t connect to amazon for you, you need to do that yourself following the guides on aws.amazon.com.




Nice! Once you have converted the zone info using bindtoroute53.py, you could then use boto (https://github.com/boto/boto) to actually upload the converted zones to route53.
Thats the next step
I’ll be working on those scripts and also making some code that will create new zones and allow you to easily delete/add/update records (watch this space)
[...] This post was mentioned on Twitter by Victor Trac, Mitch Garnaat. Mitch Garnaat said: Cool. A Python script to convert DNS zone data to the XML format used by #route53. http://goo.gl/YvFxA [...]
Cool script. Small error in the namespace:
http://route53.amazonaws.com/doc/2010-10-01/
should be:
https://route53.amazonaws.com/doc/2010-10-01/
Requests using the http: namespace no longer work.
Thanks for that Marco,
I’ve updated the script to reflect the changes you suggested. Just a note to other the Perl script on the AWS site also needs this update.
Ric
The script link is not accessible (something wrong with your permissions settings, I assume).
Maybe you could “donate” the script to boto (https://github.com/boto/boto) so its is accessible for a wider audience – or at least host the code on github or similar place
Thanks!
Fixed the link, well spotted
I’m currently working on a bigger script using boto that will let you upload the finished XML to route53, as well as create zones and delete records etc etc.
Watch this space
Updated the script so it can now handle multiple elements for a common host name. Example: