2

I m implementing AWS Cognito in .Net application for User Signup/SignIn. And using code verification for SignUp Confirmation.

I m trying to customize verification messages in AWS Cognito console like this

enter image description here

but later I found that same email goes out when Forgot Password sends the verification code.

I want to send a different verification code email on 'Forgot Password'.

Do I need to write a Lambda function to trigger custom email like on some event "CustomMessage_SignUp"?

And this needs to be written on AWS Lambda console or I can write in .Net project and can link it with Cognito?

How can I achieve this, please advice?

kplates
  • 700
  • 1
  • 7
  • 16
Anil D
  • 1,989
  • 6
  • 29
  • 60

2 Answers2

1

Yes, you need to write a Lambda function if you require a dynamic meesage for each event that gets triggered during the User Pool Workflow. Once you implement the lambda you need to hook it up with the user pool using the Triggers menu --> Custom Message.

Yes,you can use .Net to implement the lambda. Perhaps this thread might help you with implementing one: Custom Template For Triggers using Lambdas implemented in .Net

Harobed
  • 145
  • 1
  • 13
-1

I myself checked creating a new User Pool with a custom email prompt and I guess I found the solution

This thing only works when you give a proper HTML formatted message body. If you give plain text then it shows the original or the last proper HTML body.

So you can change the above message to

<html>
<body>
Thanks for signing up <br>
Your account has been created ...... Your verification code is {####}.
</body>
</html>
Parth Manaktala
  • 1,112
  • 9
  • 27