Skip to content

Instantly share code, notes, and snippets.

@toastdriven
Created September 11, 2013 20:23
Show Gist options
  • Save toastdriven/6529278 to your computer and use it in GitHub Desktop.
Save toastdriven/6529278 to your computer and use it in GitHub Desktop.
# The gif used for uploading below can be grabbed from https://dl.dropboxusercontent.com/u/114233/tally_ho.gif
import boto
conn = boto.connect_s3()
try:
bucket = conn.get_bucket('ssl_test')
except:
bucket = conn.create_bucket('ssl_test')
for i in range(10):
for key in bucket.list():
key.delete()
key = bucket.new_key('tally_ho.gif')
key.set_contents_from_filename('tally_ho.gif')
k = bucket.get_key('tally_ho.gif')
print len(k.get_contents_as_string())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment