Find IAM user by Access Key
Assuming the AWS command is installed and configured correctly
AWS_ACCESS_KEY=AKIAXXXXXXXXEXAMPLE
aws --output text iam list-users | awk '{print $NF}' | xargs -P10 -n1 aws --output text iam list-access-keys --user-name | grep ${AWS_ACCESS_KEY}
Comments
Post a Comment