Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to edit or change the email in cognito?

There occurred a mismatch when I had inserted email address of the user when signed up, in my db email address are in lower case but in cognito it's in upper case. Is there any way which I can convert those to lower case in cognito.

Thanks in advance.

like image 273
Manoj Perumarath Avatar asked Oct 28 '25 08:10

Manoj Perumarath


1 Answers

Yes. You can edit this data by using: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUpdateUserAttributes.html

or using awscli with: https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/admin-update-user-attributes.html

If you would like to insert Email lower case to Cognito later after sign up. You should use above API on PostConfirmation Lambda Trigger hook to convert Email because there is no way to transform email in Pre-Signup Lambda Trigger hook.

Hope this help.

like image 100
Phan Việt Avatar answered Oct 30 '25 23:10

Phan Việt