Skip to content

Instantly share code, notes, and snippets.

@spenserpothier
spenserpothier / find_iam_user.py
Last active August 16, 2017 20:28 — forked from OnlyInAmerica/find_iam_user.py
Find the IAM username belonging to the TARGET_ACCESS_KEY
#!/usr/bin/env python
# Find the IAM username belonging to the TARGET_ACCESS_KEY
# Useful for finding IAM user corresponding to a compromised AWS credential
# Usage:
# find_iam_user AWS_ACCESS_KEY_ID
# Requirements:
#
# Environmental variables:
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
# python: