I want to use Datasync to copy data from a single S3 bucket in one account to a single S3 bucket in another account. I'm following this official AWS Datasync blog: https://aws.amazon.com/blogs/storage/how-to-use-aws-datasync-to-migrate-data-between-amazon-s3-buckets/ in the second section "Copying objects across accounts".
I've set up the source and destination buckets, and
- done the initial steps to "Create a new IAM role and attach a new IAM policy for the source S3 bucket location" and
- "Add the following trust relationship to the IAM role" (you can see where I mean in the blog by searching for those strings in quotes) but
- I'm now confused about which account to use to "Open the source S3 bucket policy and apply the following policy to grant permissions for the IAM role to access the objects" and
- which account to use to run the AWS CLI command "aws sts get-caller-identity" and
- then the "aws datasync create-location-s3" command straight after that. Am I doing those on the source or destination accounts?
The blog is a bit confusing and unclear on those specific steps and I can't find a simpler guide anywhere.