如何列出访问 S3 私有存储桶的用户或角色

How to List User or Role accessing S3 Private Bucket

在单个账户中列出访问私有 S3 存储桶的 IAM 用户或角色的方法。

您可以在 Amazon S3 存储桶上激活日志记录。

参见:Logging requests using server access logging - Amazon Simple Storage Service

日志包含 请求者 的字段:

The canonical user ID of the requester, or a - for unauthenticated requests. If the requester was an IAM user, this field returns the requester's IAM user name along with the AWS root account that the IAM user belongs to. This identifier is the same one used for access control purposes.