Am having some difficulties getting a few things working with cross-account data copies. Specifically, I'm trying to clone an S3 bucket from one AWS account (in eu-west-1
) to another (in eu-west-2
).
I've tried setting up bucket replication per this guide, adding a Replication Batch Operation to copy existing files, and have also tried a DataSync job per this guide.
Despite having followed the guides to the letter:
Replication metrics show no activity and the destination bucket is still empty 24 hours later.
The replication batch operation aborted with the reason
Job failure rate 100% is above 50%
.The CloudWatch log for the DataSync job provides only this detail:
finished with status Unable to connect to S3 endpoint
I wonder if I'm missing some prerequisite that the guides assume will have already been set up; eg. Is there a need to establish some kind of trust relationship between two AWS accounts before cross-account permissions will work?
ie, where the intended destination S3 bucket in account 987654321098 has a permissions policy that includes this snippet to identify the actioning role in the source account:
"Sid": "DataSyncCreateS3LocationAndTaskAccess",
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::123456789012:role/source-account-datasync-s3-copy-role" }
..is that all that should be needed for the destination account to trust the IAM role from the other account?