Bucket Policy
{
"Version": "2012-10-17",
"Id": "Policy1589032691178",
"Statement": [
{
"Sid": "Stmt1589032265458",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::<BUCKET>/*"
}
]
}
This will allow read objects to all user.
IAM Policy attached to user ABC in AWS Account 1
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::<BUCKET>"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::<BUCKET>/*"
}
]
}
With this setup public read of objects is there to anyone
And IAM policy is attached to user ABC, so ABC has access to list, put, get, delete
Now the question is If someone in AWS Account 2 creates a user XYZ and attached same IAM policy as above Will the XYZ user in AWS Account 2 be able to list, get, put, delete ?