Search code examples
amazon-web-servicesaws-lambdaamazon-cognito

AWS Cognito - Trigger reset password email


I need to trigger a password reset email from inside a lambda function on aws.

I tried the CognitoIdentityServiceProvider > adminResetUserPassword, but this appears to only set the account as requiring a reset and asks the user the next time they log in, without actually sending an email.

Is there a way to force send the email / trigger the event programmatically?


Solution

  • The documentation for the forgotPassword method says "Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user's password."