[Tutorial] AWS S3 Sync Between Two Buckets From Different Account

preview_player
Показать описание
A step by step tutorial on how to sync aws s3 buckets between two different account.
I'll use aws cli to do the sync operation and will show you how to setup the correct bucket policy on the source bucket.
The user will also need an IAM policy to allow him access to the source and the destination bucket.

Hope you find it helpful, if the mood strike hit that like button.👍👍👍

==================
💡 You can follow me on :
==================

=========
Subscribe
=========

🔥 Don't miss any future video! hit that subscribe button
Рекомендации по теме
Комментарии
Автор

Thank you so much it worked for me perfectly 😍

traveldiariesnepal
Автор

1. In Destination AWS account, create a User (Admin_CLI) or use an existing User - copy their ARN.
2. In Source AWS account, go to your bucket→permissions→bucket policy Edit→Policy Generator to create a Policy:
1. S3 Bucket Policy
2. paste User ARN in Principal field
3. Actions: ListBucket, GetObject
4. paste Source bucket ARN in ARN field
5. Add Statement→Generate policy
6. copy policy and paste in bucket policy
7. might need to add bucket content in Resource as list [bucketname, bucketname/*]
3. In Destination AWS account, go to Policy and create a Policy:
1. S3
1. ListBucket, Read GetObject
2. Resource: Source bucket and object contents
2. Add Additional S3 permissions:
1. ListBucket, Write PutObject
2. Resource: Destination bucket and object contents
3. Give name and save
4. Go to user (in the same Destination AWS account) and attach above saved policy.
5. Go to Cloudshell (in the same Destination AWS account) and run the below command:
1. aws s3 sync s3:/sourcebucket s3://destinationbucket --profile Admin_CLI

In simple words, you tell your Source bucket that a destination account user will come and fetch data from you. And in the destination account, via policy you grant user access to read from source and write into destination bucket. Thats pretty much it.

AbdulH
Автор

Very helpful and clear explanation! Thank you :)

ashwathvijayan
Автор

Thank you very much, Could you also please make a video for batch transfer between different accounts.

abdulraheemsyed
Автор

will it work on large files /objects greater than 50GB

kamalnayan
Автор

thank you so much it really works save my so much time

ayyubkhan
Автор

Can I use iam role of destination account instead of user?

mahender
Автор

sir i am trying this, user and policy generated is sucess but last step i have face the error in invalid location
pls response for me . send the telegram link.

TirupathyG