Doug Jaworski

Amazon Route 53 With Cli53

I am running all my personal domains now on Route53. Figured, why bother with the complexity and overhead of running my onw DNS servers when I can use a programatic DNS server that allows me to update records within applications leveraging a robust API. Up untill about 2 weeks ago, you were completly limited to Amazon’s API and 3rd party wrapers. The one I chose to work with cli53 as it was straight forward and for the most part followed the README and was up and running in minutes.

1. Install Boto Boto is a python interface to Amazaon Web Services.

1
apt-get install python-boto

2. Create a Boto Confif File The boto config stores your amazon credentials, so keep this secure. As an alternitive, you could set these as enviornment variables.

1
2
3
[Credentials]
aws_access_key_id =
aws_secret_access_key =

3. Install cli53 I like to keep my Amazon applications in one easy place. To make it systemwide, I use /usr/local/ec2.

1
2
3
4
5
6
7
mkdir /usr/local/ec2
cd /usr/local/ec2
git clone git://github.com/barnybug/cli53.git
cd cli53
python bootstrap.py
bin/buildout
ln –s /usr/local/ec2/cli53/bin/cli53 /usr/local/bin/cli53

The last step creates a symbolic link to /usr/local/bin and that should already be in your path. To test it out and make sure it works, simply run

1
cli53 list

This will show a listing of all your zones. Since this is your first time, it should come back empty.

4. Create Zones and Records Now lets create our first record. For this we will use example.com

Create the zone

1
cli53 create example.com

Create a record

1
cli53 rrcreate example.com www CNAME  ec2-174-129-252-150.compute-1.amazonaws.com

Delete a record

1
cli53 rrdelete example.com www

It is as simple as that. I will work up a MAC friendly version of this tutorial in the near future.

Comments