Skip to content

Instantly share code, notes, and snippets.

@Voronenko
Created January 5, 2023 13:22
Show Gist options
  • Save Voronenko/80797c4777f410ced556c230847ed4ad to your computer and use it in GitHub Desktop.
Save Voronenko/80797c4777f410ced556c230847ed4ad to your computer and use it in GitHub Desktop.
#!/bin/bash
for user in $(aws iam list-users --query 'Users[*].UserName' --output text); do
echo $user;
echo "======================";
aws iam list-access-keys --user $user --query "AccessKeyMetadata[].AccessKeyId" --output text
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment