aws-samples / serverless-patterns

Serverless patterns. Learn more at the website: https://serverlessland.com/patterns.
https://serverlessland.com
Other
1.54k stars 908 forks source link

[New repo]: How to use WhatsApp to send Cognito OTP messages #1846

Closed ReethiJ closed 10 months ago

ReethiJ commented 10 months ago

Description

This repository offers guidance on how to use an Amazon Cognito Userpool's custom SMS sender Lambda trigger to send OTP messages on WhatsApp when a user signs up.

Amazon Cognito lets you easily add user sign-up and authentication to your mobile and web apps. Amazon Cognito works with external identity providers that support SAML or OpenID Connect, social identity providers (such as Facebook, Twitter, Amazon) and you can also integrate your own identity provider.

By default, Amazon Cognito uses Amazon Simple Notification Service (Amazon SNS) for delivery of SMS text messages. This can be changed with the help of custom SMS sender trigger. When you assign a custom SMS sender trigger to your user pool, Amazon Cognito invokes a Lambda function instead of its default behavior when a user event requires that it send an SMS message. With a custom sender trigger, your AWS Lambda function can send SMS notifications to your users through a method and provider that you choose. This This guide will walk you through the process of implementing custom SMS sender Lambda triggers to send one-time password (OTP) messages for user sign up via WhatsApp.

language

English

runtime

TypeScript

Level

300

Type

Examples

Use case

Backend

Primary image

https://github.com/ReethiJ/cognito-whatsapp-otp/blob/main/images/architecture-diagram.jpg

IaC framework

AWS CDK

AWS Serverless services used

Description headline

How to use WhatsApp to send Cognito OTP messages

Repo URL

https://github.com/ReethiJ/cognito-whatsapp-otp/tree/main

Additional resources

https://aws.amazon.com/cognito/ https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-sms-sender.html https://aws.amazon.com/secrets-manager/

Author Name

Nideesh KT & Reethi Joseph

Author Image URL

https://drive.google.com/file/d/1leKzwJxa7Voandp1MhO_mzKdr-73GK4t/view https://drive.google.com/file/d/1fthW0WuTMx8dKt3EPoh6NHFdj-jBrtvf/view

Author Bio

Nideesh is a Senior Cloud Support Engineer at AWS who specialises in Serverless. Reethi is a Senior Cloud Support Engineer at AWS who specialises in Serverless.

Author Twitter handle

No response

Author LinkedIn URL

https://www.linkedin.com/in/nideesh-k-t-ab4250124/ https://www.linkedin.com/in/reethi-joseph/

leave

No response

jbesw commented 10 months ago

Thanks - this will be live at https://serverlessland.com/repos/cognito-whatsapp-otp shortly.