Which AWS service to use to receive notifications in browser that a record changed in real time

138 views Asked by At

I create web application with AWS services backend. I need to get notifications from backend when data is changed in backend database. For example there is comments list, if somebody posts comment all users should see changes in application immediately. Please advice me on Amazon services that could help me. I think that AWS kinesis can help me, but I can not find examples of how to receive events

2

There are 2 answers

0
Mark B On

You could use ElastiCache (Redis) as suggested in the comments. You could also use the AWS IoT service's websockets feature. Or you could run a service on an EC2 instance that the browser could connect to via either websockets or some sort of polling mechanism.

0
Dmitry Deryabin On

Subjectively, Kinesis seems to be an overkill for such task. If you want something close to a push model, you could potentially implement something based on, for instance, stored procedure in AWS Aurora invoking Lambda function, which sends a message to an SNS topic. Your clients may then subscribe to that SNS topic and get notified about any changes.

Although SNS provides a quite convenient publish/subscribe model, SNS message delivery to all subscribers, however, may take a few seconds, and there is no delivery latency guaranteed.