0

Hi i am new to AWS and IOT in general , is there a way to let AWS console send data stored in Dynamo DB on update to client side using web-socket ?

ESP32-->DynamoDB ----OnUpdate()--->send json to client using web-socket

1 Answer 1

1

You'll likely need to use a combination of AWS products to do this, but yes, it's possible. Here's how you might set it up to work in a pretty serverless way, that scales to whatever traffic you want at a linear cost per operation:

  • ESP32 -> DynamoDB - You're doing a PutItem or UpdateItem operation here, note that and make sure there's a way to filter the operations you want to send updates for.

  • Activate DynamoDB Streams - this is a system that will do something you want for each change in the DynamoDB table. You'll have the option of choosing which data to include in the stream events, depending on what you need access to, you can make a choice.

  • Set up a Lambda function in whatever language you want and configure it to be called in response to the stream. This gives you a fast and consistent way to process each event on the stream. Write your logic in the Lambda to check whether this update needs to be broadcast or not, and which topic it should be sent under.

  • Set up IoT Core for access from the browser, probably using MQTT over Websockets, and send the message into the topic you want from the Lambda.

This should do what you want.

Sign up to request clarification or add additional context in comments.

2 Comments

If you can share the nature of the data you're working with, there might be easier and faster ways to do it as well.
this is the data i send this json object each 5 seconds { "device_id": "esp32666", "cpn": "27721H", "DhtData": "-18.00", "soundGateData": "4095", "GpsData": "" }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.