How to allow AWS Cognito configuration with Username & Email login using CloudFormation?

Viewed 403

I would like to create Cognito (using CLOUDFORMATION) which allow login with Username & Email, I have gone through AWS user pool documents and also follow Cognito Doc, But didn't find any solution. enter image description here

1 Answers

You can check here the cloudformation for a Userpool: link

About your question:

Use "AliasAttributes" with an array with the string "email", "preferred_username"

yaml:

AliasAttributes:

  • email
  • preferred_username

json:

"AliasAttributes": ["email", "preferred_username"]

edit: AliasAttributes instead of UsernameAttributes

Related