I have a simple IAM role with a policy to list a specific bucket and allow get operations on all its contents. The role is assumed by another account. When the account assume the role, no buckets are shown. Here is the policy. What is wrong?
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::foobar"
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject"
],
"Resource": "arn:aws:s3:::foobar/*"
}
]
}