When I decided to study aws and python, I found something called Boto3! First, I created a list process for IAM users. (Leave the code terrible)
I'm still studying so I want to be able to write more
# -*- coding: utf-8 -*-
import boto3
from boto3.session import Session
client = boto3.client('iam')
# def
def user_list():
response = client.list_users()
for user in response["Users"]:
print(user["UserName"])
# main
if __name__ == "__main__":
user_list()
from : https://github.com/handa3/study/blob/master/aws/iam/user_list.py
Recommended Posts