import boto from boto.s3.key import Key import sys def run(name, string): s3 = boto.connect_s3() b = s3.create_bucket("map_test_pages") k = Key(b) k.key = name k.set_contents_from_string(string,headers={'Content-Type': 'text/html'}) k.set_acl("public-read") if __name__ == "__main__": run(sys.argv[1], open(sys.argv[2]).read())