github.com/greenboxal/deis@v1.12.1/database/templates/create_bucket (about) 1 #!/usr/bin/env python 2 3 import boto 4 import sys 5 from boto.s3.connection import OrdinaryCallingFormat 6 7 8 conn = boto.connect_s3( 9 host='{{ getv "/deis/store/gateway/host" }}', 10 port={{ getv "/deis/store/gateway/port" }}, 11 is_secure=False, 12 calling_format=OrdinaryCallingFormat()) 13 name = sys.argv[1] 14 15 if conn.lookup(name) is None: 16 conn.create_bucket(name)