Is it possible to use Socket.io with AWS Lambda?

后端 未结 8 1460
深忆病人
深忆病人 2021-01-30 01:31

Is it possible to build a function in AWS Lambda that creates a websocket and send data to subscribed applications?

Something like this:

John has the app SuperPh

8条回答
  •  闹比i
    闹比i (楼主)
    2021-01-30 02:11

    Recently AWS released support of WebSockets for IoT service. It is very easy to use as Pub/Sub message system for serverless web applications. You can post new messages from AWS lambda function via http post request and receive them as websocket messages on a client.

    I wrote a small npm package that handles websocket connection to MQTT server from the front-end app. Check out aws-mqtt-client

提交回复
热议问题