in order to list all users of a cognito user-pool, I thought of using boto3's client.list_users()
-function including pagination.
However, if I call print(client.can_paginate('list_users'))
, False
is returned since this function list_users()
is not pageable.
Is there an alternative to listing all users of a cognito user-pool without filtering those users out that have already been selected?
My current code without pagination looks this:
client = boto3.client('cognito-idp',
region_name=aws_region,
aws_access_key_id=aws_access_key,
aws_secret_access_key=aws_secret_key,
config=config)
response = client.list_users(
UserPoolId=userpool_id,
AttributesToGet=[
'email','sub'
]
)
Many thanks in advance!