Skip to content

Instantly share code, notes, and snippets.

@rob-murray
Created May 17, 2016 11:07
Show Gist options
  • Save rob-murray/7a9329dab1fe173f68a0b98c707fe289 to your computer and use it in GitHub Desktop.
Save rob-murray/7a9329dab1fe173f68a0b98c707fe289 to your computer and use it in GitHub Desktop.
List AWS IAM user accounts - assuming you have AWS Command Line Interface installed
# usage: list_aws_users.sh > list_aws_users.txt
# requirements: AWS Command Line Interface
# output: ACCESSKEYMETADATA ACCESS_KEY_ID last_used_at Active|Inactive access_key_name
#
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