Skip to content

Instantly share code, notes, and snippets.

@jmhobbs
Created April 13, 2012 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmhobbs/2378075 to your computer and use it in GitHub Desktop.
Save jmhobbs/2378075 to your computer and use it in GitHub Desktop.
Clone An S3 Bucket Into Another Bucket
from boto.s3.connection import S3Connection
conn = S3Connection('YOUR-ACCESS-KEY', 'YOUR-SECRET-KEY')
bucket = conn.get_bucket('FROM-BUCKET-NAME')
for key in bucket.list():
print key.name
key.copy('TO-BUCKET-NAME', key.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment