Reputation: 63
I'm trying to write a lambda function that gets's triggered by any changes to a dynamoDB table, and send browser push notification through SNS which will be invoked by the Lambda, what are good practices to achieve this functionality? AWS documentation lacks details, can someone point to a tutorial or repo that explains how to structure such service?
Upvotes: 6
Views: 11706
Reputation: 41
Now you can trigger AWS SNS without Lambda using EventBridge Pipes (re:invent 2022). This can trigger SNS notification with DynamoDB table change.
DynamoDB Streams --> EventBridge Pipes --> AWS SNS.
No need for Lambda code to trigger SNS now.
For more details, you can read this blog - https://medium.com/@moitrasayan007/triggering-aws-sns-with-dynamodb-streams-without-lambda-with-eventbridge-pipes-9d8f1a9aa209
Upvotes: 4
Reputation: 2758
I think the exact use case you are describing is covered by the DynamoDB Streams Use Cases blog article. Scroll down to the Notifications/messaging section.
For the push notification part, that should be pretty straightforward via the SNS Documentation.
Upvotes: 6