LoginSignup
0
2

More than 5 years have passed since last update.

Boto3でIAMユーザのリストを取得

Last updated at Posted at 2017-05-09

awsとpythonを勉強しようと思ったところ、Boto3なるものを発見!
まずはIAMユーザのリスト処理を作成してみました。(コードがひどいとかは置いておく)

まだまだ勉強中なのでもっと書けるようになりたいなー

# -*- 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

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2