I'm trying to setup sync between two buckets on different AWS accounts.
I got cp working with:
@ubuntu:~$ s3cmd cp -v s3://src/dir/ s3://dest/folder --recursive I am the user who owns /src/dir and I've added:
{ "Version": "2012-10-17", "Id": "Policy1477299702471", "Statement": [ { "Sid": "Stmt1477299696163", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::awsid:user/name" }, "Action": "s3:*", "Resource": "arn:aws:s3:::bucket/*" } ]} To the bucket permissions policy on the test bucket.
Now I'm after aws sync to work, as using s3 cp is not recommended for using with cron.
I tried
user@ubuntu:~$ aws s3 sync --dryrun s3://src/ s3://dest/ --region eu-central-1 but I get access denied:
fatal error: An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied
How can I get access denied if this is the user who owns the bucket, and get sync running?