Skip to content

Instantly share code, notes, and snippets.

@mdfranz
Created August 3, 2013 21:01
Show Gist options
  • Save mdfranz/6147964 to your computer and use it in GitHub Desktop.
Save mdfranz/6147964 to your computer and use it in GitHub Desktop.
VPC Region Fun with Boto
# Not sure why I had to do this, seems like I shouldn't have to
def region_from_str(s):
regions = boto.ec2.regions()
for r in regions:
if s == r.name:
return r
vpc_conn = VPCConnection(region=region_from_str(region))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment