A website offers a websocket to get real-time data from. I'm trying to record data received from the websocket in a DynamoDB table for a data source for a serverless application. Their example of how to use the websocket is some Node.JS code using socket.io-client. Being JavaScript I thought to use an AWS Lambda function but they are not purposed to run constantly. Is there an AWS service to handle this sort of subscription? I don't want to make a small EC2 instance to run a tiny application just for this purpose.
Things I've looked at:
Any help would be greatly appreciated!
You cannot use Lambda directly to keep a Websocket connection since Lambda and API Gateway is stateless. There two services in AWS you can use to achieve this,
Note: You might need to request for the preview of AppSync at the moment.