How to Migrate S3 Data Between Two AWS Accounts?

0
4
Asked By CuriousExplorer56 On

I'm dealing with a bit of a tricky situation. I've got two separate AWS accounts set up, each with its own billing and email, and I need to move data from my old account to my new one. Currently, I've uploaded about 4GB worth of files (around 3000 files) to the old account, which I refer to through an API. Recently, I've started using my new account for uploads, and now I'm looking to migrate all the data from the old account to the new one. I've tried using AWS DataSync, but it hasn't worked for me. Can anyone suggest how to transfer all my old data? I own both accounts, so permissions shouldn't be an issue. Additionally, I will need to update the AWS S3 links in my database once the transfer is complete, but my priority right now is the data migration.

3 Answers

Answered By DataGuru99 On

A quick solution would be to set a resource policy on your target bucket that allows your source account to upload objects. From the source account, you can then use the CloudShell to run an S3 copy command to transfer your files easily.

Answered By TechWhiz42 On

Could you clarify what issues you're running into with DataSync? I've successfully migrated 800GB of files between buckets using it! You have a couple of options: you can either push the data from Account 1 to Account 2 or let Account 2 pull the data from Account 1. Either way, remember you'll have to adjust the bucket policies accordingly.

Answered By CloudMaster77 On

Consider using S3 bucket replication across accounts. You can also set an S3 event trigger on the new bucket that activates a Lambda function to update your database as files are transferred. Just keep in mind, this approach will only handle new or updated files, not existing ones.

DataWhiz88 -

Exactly! So you'll need another method for those old files, but any new files after replication should flow smoothly. Just keep that in mind!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.