#!/usr/bin/env python

import boto
import sys
from boto.s3.connection import OrdinaryCallingFormat


conn = boto.connect_s3(
    host='{{ getv "/deis/store/gateway/host" }}',
    port={{ getv "/deis/store/gateway/port" }},
    is_secure=False,
    calling_format=OrdinaryCallingFormat())
name = sys.argv[1]

if not conn.lookup(name):
    conn.create_bucket(name)
