Created
October 25, 2013 13:21
-
-
Save maurostorch/7154599 to your computer and use it in GitHub Desktop.
upload files to S3-Amazon object storage system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
conn = S3Connection('s3_access_key','s3_access_pwd') | |
#conn.create_bucket('first_20131025') | |
b = conn.get_bucket('first_20131025') | |
k = Key(b) | |
k.key=sys.argv[1] | |
k.set_contents_from_file(open(sys.argv[1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment