I have created bucket POC-work from the admin account, and under this policy, I have set policy like below:
{
"Version": "2012-10-17",
"Id": "Policy1620674317608",
"Statement": [
{
"Sid": "Stmt1321974214233",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::accound-id:user/iam-user"
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::poc-work",
"arn:aws:s3:::poc-work/*"
]
}
]
}
When an IAM user logs in and checks for s3 service there is an error message: You don't have permissions to list buckets.
My questions are :
- How can I create a bucket policy that enables list s3 buckets?
- Is it necessary to attach policy already defined browsing on IAM console and then rest of operations control with bucket policy?