Created
May 12, 2021 11:25
-
-
Save breenie/91126ecf7880c97bc799888de152baff to your computer and use it in GitHub Desktop.
Find all AWS access keys in an account
This file contains hidden or 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
#!/bin/env bash | |
# Cribbed from somewhere on the internet | |
for user in $(aws iam list-users --output text | awk '{print $NF}'); do | |
aws iam list-access-keys --user $user --output text | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment