This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example: python find_username_by_access_key.py <your_key> | |
import sys, boto3 | |
TARGET_ACCESS_KEY = sys.argv[1] | |
client = boto3.client('iam') | |
paginator = client.get_paginator('list_users') | |
response_iterator = paginator.paginate( | |
PaginationConfig={ | |
'MaxItems': 150, |