Saltycrane logo

SaltyCrane Blog

Notes on Python, Django, and web development on Ubuntu Linux

    

Python boto RDS example

RDS

References

Example

from pprint import pprint
from boto import rds

AWS_ACCESS_KEY_ID = 'XXXXXXXXXXXXXXXXXXXX'
AWS_SECRET_ACCESS_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''

# connect
rds_conn = rds.RDSConnection(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)

# list all db instances
dbinstances = rds_conn.get_all_dbinstances()
for dbi in dbinstances:
    pprint(dbi)

# create a security group
security_group = rds_conn.create_dbsecurity_group('group1', 'My first DB security group')

Post a comment

Required
Required, but not displayed
Optional

Format using Markdown. (No HTML.)
  • Code blocks: prefix each line by at least 4 spaces or 1 tab (and a blank line before and after)
  • Code span: surround with backticks
  • Blockquotes: prefix lines to be quoted with >
  • Links: <URL>
  • Links w/ description: [description](URL)
Created with Django | Hosted by Linode