AWS cognito: send custom email

Manh Vu
LecleVietnam
Published in
1 min readDec 2, 2018

Aws have a service called simple email service, which is quite easy to use. But I can not find any simple way to use it in combination with cognito email.

Fortunately, I found that we can use its trigger lambda. Aws provides a super easy console to create lambda on function right on the browser .

Event object in case of CustomMessage_SignUp. Notice on triggerSource it will show you which event is.

And function on lambda for customizing email is:

Note:

  1. I use node 8.10 for run time
  2. Care about environment variables app__base_url it is added by section Environment variables below the code editing console.
  3. Lambda timeout should be customized, I change it to 15s

By Manh Vu@ Lecle VietNam Blog

--

--