Skip to content

Instantly share code, notes, and snippets.

@breenie
Created May 12, 2021 11:25
Show Gist options
  • Save breenie/91126ecf7880c97bc799888de152baff to your computer and use it in GitHub Desktop.
Save breenie/91126ecf7880c97bc799888de152baff to your computer and use it in GitHub Desktop.
Find all AWS access keys in an account
#!/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