Skip to content

Instantly share code, notes, and snippets.

@GeneralTesler
Created December 6, 2019 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GeneralTesler/065bcf3ef24ba01d6196d4bc9ae6b9a9 to your computer and use it in GitHub Desktop.
Save GeneralTesler/065bcf3ef24ba01d6196d4bc9ae6b9a9 to your computer and use it in GitHub Desktop.
boto3 list users via resource handler
import boto3
if __name__ == "__main__":
session = boto3.session.Session()
resource = session.resource("iam")
[print(r.arn) for r in getattr(resource, "users").all()]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment