User Management with AWS Cognito — (2/3) The Core Functionality
Kangze Huang

Thanks for the blog posts and inspiration. How do you avoid using the email as the username to allow users to change their email address? It seems most docs suggest using the preferred_username but that seems weird to reference an old email address as the username. Besides a presignup lambda trigger, it seems like it’s best to use adminCreateUser to set something like a uuid as a username. It involves more work to recreate signup/confirm calls but after some initial testing it seems like a decent approach. Here’s an overview in a gist if you’re interested Thanks again!