I have tried to invoke the custom message function to send emails through SendGrid, well it worked but I don't have a way to stop AWS from sending through their emails. I have tried to set the messageAction
to "SUPPRESS" but another problem arises. There is no such support for self-registration since messageAction
is only for adminCreateUser function. Did I miss something or am I not doing this properly?
Custom Sender Lambda Triggers is the way to use 3rd party notification service providers.
Cognito docs are lacking at the moment (steps are missing, Lambda code has to be fixed after copying from the example, no instructions of how to deploy with CloudFormation, ...).
High level overview of the steps:
kms:Decrypt
the key. Pass the key ARN as the environment variable.LambdaConfig
providing Lambda and KMS Key ARNs.Tooling (as of March 2021):
I've blogged about the process of setting up the Custom Email Lambda Trigger with CloudFormation and Terraform: Send AWS Cognito emails with 3rd party ESPs.
It seems that now Cognito is starting to support this.
Cognito provides two Lambda triggers CustomEmailSender
and CustomSMSSender
to enable third-party email and SMS notifications.1
1Source from AWS Cognito docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With