I have 3 AWS accounts:
- S3 Owner
- Account A
- Account B
I have a bucket owned by the "S3 Owner" account which has a bucket policy on it to allow both the A and B accounts to have full access on the bucket and the object. I also have the ACL setup so that the A and B accounts have full access to the objects too.
I am trying to have either account A or B upload an object to the bucket but allow the other account to copy it. However, I keep getting an access denied exception. I would use a lambda to set the ACL on the object to the same as the bucket (all 3 ACLs) however that would require a lambda running in both account A and B which would have to figure out if it was the owner in order to set the ACL. Is there an easier way to achieve this?