enjineerMan
enjineerMan

Reputation: 142

Create rule in AWS IoT core to insert data into an existing row in DynamoDB

When data is sent from my thing to AWS, it will be a string with several values separated by spaces. One of these values is the ID of the device, that I want to use to query the database and insert the data into that row. How can I do this?

Upvotes: 0

Views: 480

Answers (1)

cementblocks
cementblocks

Reputation: 4616

This might be tricky using just a single topic rule since the topic rules mainly work with JSON data. You can handle non-json data but your options are limited. You can always trigger a lambda function from the topic rule. The lambda function could then easily parse the message and write to DynamoDB.

See https://docs.aws.amazon.com/iot/latest/developerguide/binary-payloads.html for how you can work with non JSON data in IoT topic rules.

Upvotes: 1

Related Questions