aws iam list-access-keys
aws iam list-access-keys [--user-name <name>]
Risk: Safe
What it does
Lists a user's access keys and whether each is Active or Inactive. It never shows the secret.
When to use it
To find old keys to switch off and delete.
Example
$ aws iam list-access-keys --user-name BobShow Bob's keys.
$ aws iam get-access-key-last-used --access-key-id AKIAIOSFODNN7EXAMPLEWhen did this key last work?
Learn it in: Access keys: avoid them, rotate them · Official docs