Does Amazon provide a way to copy a bucket from one account to a different account? I am uploading several gb of files to my own bucket for a client app for development purposes, but when handing off the code I'm going to want to switch the bucket to their account (so I am no longer paying for the storage). Uploading is taking quite awhile because there are many small files, and I would like to avoid the same arduous process later, when I move the files into the other bucket.
The short answer is you can't migrate a S3 bucket from one region to another.
Amazon S3 supports global buckets, which means that each bucket name must be unique across all AWS accounts in all the AWS Regions within a partition. A partition is a grouping of Regions.
You could use crossftp ( http://www.crossftp.com/ ) to server transfer it from one account to another. But you will still have to pay the traffic.
other solution would be: http://gallery.bucketexplorer.com/displayimage-93.html
boto works well. According to the creator of boto:
Assuming you have account A and account B and all of the objects are currently stored in a bucket owned by account A, you should be able to grant account B read access to the existing bucket(s) and then, using the account B credentials COPY the objects into a bucket(s) owned by account B. I think something like this should work:
conn = S3Connection(...) source_bucket =
conn.lookup(source_bucket_name) dest_bucket =
conn.lookup(dest_bucket_name) source_key =
source_bucket.lookup(key_name) dest_key = source_key.copy(dest_bucket,
key_name, preserve_acl=True)
This would create a key of the same name in the destination bucket and would also preserve the source key's ACL and metadata.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With