This is really a two part question:
I’m seeing some users in the “Grantee” dropdown for editing S3 permissions within the AWS console.
- Where are those users coming from?
- How can I delete them?
They aren’t in IAM so I’m not really sure where they’re coming from.
A grantee can either be an AWS account (which you probably added in the past) or a predefined AWS “group”, such as “Authenticated Users”, “All Users” or “Log Delivery”. Please have a look at ACL Overview, on AWS docs, for more information.
For removing grants from a given file (or from a set of files), you can use the PUT Object acl operation.
It is not clear, on the documentation, what you need to do in order to remove an user from the “Grantee” list. I performed some tests and this is how S3 is behaving:
This makes me think the Grantees list contains the entire list of users in your bucket’s ACL plus a cache of users with permissions to objects in your bucket (which is cleared upon logging out, if you remove those permissions).
So, I would try first removing the users you don’t want from your bucket’s ACL, and then (via API, of course) remove those user’s permissions for the objects in your bucket.