Yes, you can transfer the whole s3 bucket from your root account to another AWS root account.
I have tried the given options but they didn't work for me, even I explore solutions from blogs, but that also didn't work for me. So I started exploring properties and the permission tab in the s3 bucket.
And at last, I find one solution which is very easy to achieve and we do not need to create any IAM role or any policy. Just follow the given steps.
Prerequisites:
- AWS cli Installed and configured
- S3 bucket created on both source and destination account
Steps:
- Navigate to the destination s3 bucket and click on permission tab
- Scroll down to Access Control List (ACL) and click on Edit button
- Scroll down to Access for other AWS accounts and click on Add grantee button
- Enter your canonical ID in the textbox and check the object read and write permission box
- You can get the canonical ID by clicking on the top right corner of the window at your aws account name -> click on security credentials -> On that page, you can copy your canonical id.
- After adding the grantee click on the Save Changes button
- Now open your terminal/cmd and fire below command
aws s3 cp --recursive s3://source-bucket s3://destination-bucket
--source-region source-region --region destination-region --acl bucket-owner-full-control
This command will do copy and paste operation but if you want to move then you can use mv
instead of cp
in above command
Here you can replace source-bucket with your actual bucket name from where you want to copy and replace destination-bucket with your actual bucket name where you want to copy.
You can also specify source and destination region name
You can use your machine to do this or you can spin up one ec2 instance and transfer your s3 data.