Skip to content

Instantly share code, notes, and snippets.

View colebrooke's full-sized avatar

Justin Miller colebrooke

  • @concrete-cc
  • United Kingdom
View GitHub Profile
# 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,