Articles

Software - Joomla

While working with the boto python library for AWS, I was unable to find any examples of code for manipulating route53 records. Here are a few examples of how the library can be used. Bear in mind that changes to DNS will not immediately be propagated to DNS servers. You have to wait until the Time To Live (TTL) has expired before a DNS server will fetch the updated record from the authoritative name server. The default TTL for the boto library is 600s (10 minutes) but you can modify this using the ttl parameter in the add_change method. To check the remaining TTL on a record, use the 'dig' command.

Creating a connection and getting the record sets

First, you need to create a connection:

conn = boto.connect_route53()

Then, get the ResourceRecordSet. You need to get the Hosted Zone ID after you've added the domain in route53: