Created
April 13, 2012 16:22
-
-
Save jmhobbs/2378075 to your computer and use it in GitHub Desktop.
Clone An S3 Bucket Into Another Bucket
This file contains 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
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