What I'm trying to do here is sending a notification via SNS and APNS when a particular user is part of the newly added DynamoDB element. I want to send it with a Cognito Identity ID, not a device token.
Therefore, Lambda must be activated when an item is added, and then go through the list of Cognito IDs, which is also part of the item.
Lambda must then publish push notifications for each Cognito identifier identifier.
All devices are registered as endpoints in sns. I also store the Cognito identifier identifier in the user data string for the endpoint.
But I did not find a way to send notifications directly to the Cognito identifier identifier. Do I need to add a topic for each user and send a notification on this topic? Or do I need to save another DynamoDB table to match Cognito IDs with device tokens? It would be great if someone knew a simpler and not too expensive way!
Thank!
weka1 source
share