I have a lambda found in the destination account that copies s3 objects from source_A to destination_B.
For the source bucket I have attached the permissions
{ ## permission for source bucket
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::destination_B:root"
},
"Action": "s3:*" ## Also I have tried s3:Get* and s3:List*,
"Resource": [
"arn:aws:s3:::source_A",
"arn:aws:s3:::source_A/*"
]
}
]
}
For the destination lambda function, I have attached a policy which is also fairly simple and nothing complex here, and have changed the bucket ownership.
{
"Statement": [
{
"Action": "s3:*",
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::source_A",
"arn:aws:s3:::source_A/*",
"arn:aws:s3:::destination_B",
"arn:aws:s3:::destination_B/*"
],
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "bucket-owner-full-control"
}
}
}
]
}
I know this question has been asked before but I am unable to locate the mistake. Likely is going to be very small in some policy or permission. Even giving '*' permission doesn't solve the issue.
A small hint would be great. Thanks