-
-
Save antigenius0910/7241d46337139640957507e59b6987d4 to your computer and use it in GitHub Desktop.
List Access Keys for all IAM users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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