Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to transfer an Amazon S3 bucket to another account?

I configure AWS instances for clients, and I need to transfer everything to them at the end, so that the billing for AWS and S3 usage also goes on their accounts.

I know there is a way to "transfer" an EC2 instance via AMI sharing, but is there a way to transfer ownership or share S3 buckets as well? (Preferably avoid making a copy but transfer the original bucket itself).

like image 306
rustyx Avatar asked Apr 23 '15 11:04

rustyx


People also ask

How do I copy encrypted S3 buckets Cross account?

Step 1: Create an IAM policy like the one below, replace the source and destination bucket names. Step 2: Attach the above policy to the IAM user or role that is doing the copy object operation. Step 3: Change the Object ownership to Bucket owner preferred in the destination bucket.


1 Answers

S3 Buckets cannot be transferred between accounts. At least in the simple sense of "here is my bucket, now it is your bucket". Everyone seems to use some form of copying. If you have permission to both your original bucket and their destination bucket then you can use the AWS CLI and just

aws s3 sync s3://bucket1 s3://bucket2

Have you tried adding their account as an ALL PERMISSION user to one of your buckets? http://docs.aws.amazon.com/IAM/latest/UserGuide/roles-creatingrole-policyexamples.html

Then login as their account and see if they can then edit the policy to remove your original account? Not sure how the billing would turn out since you created the bucket.

like image 182
greg_diesel Avatar answered Oct 02 '22 19:10

greg_diesel