It may sound strange to use the Internet of Things as a service for websites, but AWS IoT is the only service offered by Amazon that supports WebSockets in a serverless model. Without WebSockets, we need to rely on polling. Polling is the process where the client needs to make repeated and frequent requests to the server, checking whether a new message is available, while WebSockets are used to create a link between the client and the server where the server can send the message directly to the client without the need of being constantly requested. WebSockets are used to implement the publish-subscribe pattern, which is more efficient than polling.
Besides AWS IoT, another candidate to implement real-time serverless notifications is Amazon Simple Queue Service (SQS). You can create a queue of messages that are destined for a single user and wait for this user to request SQS looking for new messages. While polling is necessary for this solution, Amazon offers a feature named long-polling...