How to create AWS Cognito userpool/users by script?

0

How to create Cognito userpool (if not exists) and add users (create/update) to the pool using script (re-enterable)? I'd like to provide the script to customer to avoid manual creation etc

Oleg
已提问 1 年前997 查看次数
2 回答
1

In addition to the above, you can also Importing users into user pools from a CSV file.

There is another, more dynamic way to import the users via Lambda, Importing users into user pools with a user migration Lambda trigger.

profile pictureAWS
专家
kentrad
已回答 1 年前
0

HI Oleg,

I would use CDK to leverage infrastructure as code. In particular, you can look at below construct to create a Cognito User pool: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPool.html.

To create users in that pool programmatically there are 3 options:

Hope it helps, and if does I'd appreciate if answer can be accepted, so that community can benefit for clarity when searching for similar questions, thanks ;)

profile picture
专家
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则