0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS Cognito ユーザー一覧を取得する

Last updated at Posted at 2021-03-16

やりたいこと

Lambda 関数に Cognito のユーザー一覧を取得するコードを書きたい。

import boto3

def lambda_handler(event, context):
    client = boto3.client('cognito-idp')
    response = client.list_users(
        UserPoolId='ap-northeast-1_XXXXXX'
    )
    user_list = [x['Username'] for x in response['Users']]
    return user_list

結果

[
  "test-user-2",
  "test-user"
]

ユーザープールIDの記載場所

これを探すのに非常に時間がかかった。調べてもユーザープールとIDプールの違いしか出てこない・・・
全般設定がクリックできるなんて思わなかった!

image.png

参考記事

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?