Dynamodb is not storing all the received IoT core data

0

Hi,

I use my IoT core to act as an MQTT broker to collect sensor data. This part works fine and everything looks correct when testing it in the test environment. The IoT core passes the data to a dynamodb table and here is where it goes wrong. I'm not receiving all the data as the IoT core does. I should have every 10-40 seconds some data but the dynamodb register sometimes with a gap of 5 minutes and other times it has gaps from over a couple of hours. Is there some kind of setting which I need to change or how to fix this that I'm not losing any data while transporting it to Dynamodb?

Data comes in this format on the test explorer:

{
  "GEG_BUF2_LT01_M3": "477.4305",
  "GEG_BIO1_TT_01": "8.709491",
  "STATUS_BIO2_P_02": "0",
  "STATUS_BIO1_S_01": "0",
  "STATUS_BIO2_P_01": "0",
  "M_alarm": "0",
  "M_nieuw_alarm": "0",
  "time": "2022-12-04 20:48:01"
}

Dynamodb table

  • Could you please explain how do you write the data into DynamoDB? Are you using one of the DynamoDB actions together with an IoT Rule? How does the SQL looks like? How is the action configured?

  • I very new to AWS and used this tutorial : https://docs.aws.amazon.com/iot/latest/developerguide/iot-ddb-rule.html Thats all I did and I received data but after checking the data I came to the conclusion that I missed some data.

  • The table you are showing (I assume this is a screenshot of the DDB table content) does not correspond to the JSON message. The name of the columns is different from the fields in the JSON messages. Are you doing any manipulation in the SQL?

  • No i just do select * from 'topic_1' , This is just a part of the Json all the Json fields are displayed in the table. Sorry for the confusion

1 Answer
0

Not sure if you are using IOT rules but please review the following resources

  1. Tutorial: Storing device data in a DynamoDB table
  2. The DynamoDB (dynamoDB) action writes all or part of an MQTT message to an Amazon DynamoDB table.

Additionally , the best way to debug issues you are having with rules is to use CloudWatch Logs. When you enable CloudWatch Logs for AWS IoT, you can see which rules are triggered and their success or failure. You also get information about whether WHERE clause conditions match. For more information, see Monitor AWS IoT using CloudWatch Logs.

profile pictureAWS
EXPERT
answered a year ago
  • This didn't work for me. redid every step and end up with same results

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions