Skip to content

Instantly share code, notes, and snippets.

@jdfitzgerald
Last active May 18, 2016 10:17
Show Gist options
  • Save jdfitzgerald/697d5d9b8109866775b0 to your computer and use it in GitHub Desktop.
Save jdfitzgerald/697d5d9b8109866775b0 to your computer and use it in GitHub Desktop.
#relies on AWS CLI & jq for JSON processing
for name in `aws iam list-users | jq -r .Users[].UserName`; do aws iam list-access-keys --user-name $name | jq ' .AccessKeyMetadata[] | .UserName + " " + .AccessKeyId'; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment