title: How to fix AccessDenied calling CopyObject
body: <p>I'm trying to copy files from a bucket in A account to another bucket but in B account. When I try to sync the files with the command </p>
  
  <p><code>aws s3 sync s3://BUCKET_A s3://BUCKET_B</code></p>
  
  <p>It returns the following output:</p>
  
  <pre><code>copy failed: s3://BUCKET_A to s3://BUCKET_B An error occurred (AccessDenied) when calling the CopyObject operation: Access Denied
  </code></pre>
  
  <p>This is the policy that was attached to user created in in B account (where will be copied files from bucket A):</p>
  
  <pre><code>{
      "Version": "2012-10-17",
      "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:GetObject",
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::BUCKET_A",
                "arn:aws:s3::: BUCKET_A/*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:GetObject",
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::BUCKET_B",
                "arn:aws:s3:::BUCKET_B/*"
            ]
        }
      ]
  }
  </code></pre>
  
  <p>Probably I missing some permission? I don't find the permission <code>CopyObject</code> to add in my user/bucket policy</p>