Charles Lavery

Creating A records with BOTO and Route53

BOTO code to add an A record with 1 IP to an existing Route53 hosted zone.

from boto.route53.connection import Route53Connection
from boto.route53.record import ResourceRecordSets

r53 = Route53Connection(ACCESS_KEY_ID, ACCESS_KEY_SECRET)

changes = ResourceRecordSets(r53, 'ZONEID...')

change = changes.add_change("CREATE", "subdomain.test.com", "A", 300)
change.add_value("8.8.8.8")

changes.commit()