Search code examples
amazon-web-servicesamazon-cognitoaws-amplify

AWS Amplify + Cognito: Create account without username/Use email instead of username?


I'm new to AWS and had a question about adding a user through the Amplify portal. I have the settings for email or phone number, but when I try and create a user, it requires a username.

I would rather have a user input an email in the place of a username, but not exactly sure of the dynamics of AWS Amplify.

AWS Cognito Settings:

enter image description here

AWS Cognito Create User (Online Portal):

enter image description here


Solution

  • With Cognito, it will always have a Username field that is considered separate from the rest of the attributes. It also contains a phone_number and email attribute which are considered separate from the username. So if you want a user to sign up via email and/or phone number, then you will submit an email/phone number as the username, AND you'll also submit the email and/or phone number in their respective fields if you want to use them for verification or account recovery options.