Create cognito user
Note: If your question is regarding the AWS Amplify Console service, please log it in the official AWS Amplify Console forum
** Which Category is your question related to? ** auth
** What AWS Services are you utilizing? ** cognito
** Provide additional details e.g. code snippets ** We need to give cognito users within an admin group the possibility to create further cognito users. I understood that is not possible at the moment to create cognito users with amplify. What alternatives concept do you see to let us create cognito users. Any help is much appreciate.
@marcschroeter You could use the AWS CLI to do so. Have you tried this alternative?
@kaustavghosh06: I think this should be reopened.
Here is a valid usecase: you want to have a server-side lambda using AWSAppSynchClient that will use AMAZON_COGNITO_USER_POOLS authentification model. With sign-in API for server-based authentication (ADMIN_NO_SRP_AUTH) enable in user pool a lambda will go and do serverside-authentification-flow which needs an actual user pre-existing.
To have this all working gracefully across amplify environments and CF stack lifetimes maybe auth cloudformation template needs:
- https://docs.aws.amazon.com/en_pv/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpooluser.html
- CF custom resource with a lambda that would go and use AdminSetUserPassword to create temporary password for user created through cloudformation
but then this default password or the attribs to generate this default password in lambda will need to be to be passed to function category lambda, not having any knowledge on doing this but maybe this how-to-create-and-retrieve-secrets-managed-in-aws-secrets-manager-using-aws-cloudformation-template
anyway for such seemingly simple usecase, this requires some work and maybe it would deserve to be abstracted, and I personally think this might fit with amplify's auth category
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.