简体   繁体   中英

How to add a "s3:ListBucket/" to give access to a bucket

Issue is IAM permissions already exist and the User x has permissions to s3:ListALLMyBuckets through identity policy, letting them return a list of all buckets owned by authenticated sender of request but missing "s3:ListBucket" action on (needed) bucket.

How can I add this permission, and should I add them to S3 or as an IAM inline policy for user?

S3 policy on needed bucket has GetObject but not ListBucket.

You will need to edit the policy that's attached to the user and add the "s3:ListBucket" permission as you mentioned.

As per the documentation, you need to have ListALLMyBuckets in order for ListBucket to work. So you need to have both permissions.

from the documentation for ListBucket :

Returns a list of all buckets owned by the authenticated sender of the request. To use this operation, you must have the s3:ListAllMyBuckets permission.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM