Skip to content

Instantly share code, notes, and snippets.

@kjm0001
Forked from mafonso/list-all-access-keys.sh
Created January 1, 2023 13:17
Show Gist options
  • Save kjm0001/1bd2a35a7621cd33d90227fc059a2d5b to your computer and use it in GitHub Desktop.
Save kjm0001/1bd2a35a7621cd33d90227fc059a2d5b to your computer and use it in GitHub Desktop.
List Access Keys for all IAM users
#!/usr/bin/env bash
for user in $(aws iam list-users --output text | awk '{print $NF}'); do
aws iam list-access-keys --user $user --output text
test $? -gt 128 && exit
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment