简体   繁体   中英

AWS Cognito User Devices Trigger

We use AWS Cognito for user authentication. Every user can have multiple devices. We would like to react to newly registered or deleted devices for every user. Ideally through a lambda trigger. How can we archieve that?

These standard triggers won't work for our usecase: Customizing User Pool Workflows with Lambda Triggers

Does anyone have sugguestions how to tackle that problem?

Step1: In AWS Cognito you net to enable the end-user device tracking as mentioned in the below document.

https://aws.amazon.com/blogs/mobile/tracking-and-remembering-devices-using-amazon-cognito-your-user-pools/

Step2: Every authentication attempt for the user, you can create an SNS message with the device info and user info.

Step3: Push this message into a SQS so that it can trigger a AWS Lambda

Step4: Process the message and respond to the user according to the required logic.

I hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM