AWS IoT for DynamoDB

0

I connected my device (ESP32) to the IoT core and I'm receiving messages subscribing to a topic in the MQTT test, but my messages don't arrive in DynamoDB, could someone more experienced help me? I've already reviewed the rules, roles and attached the appropriate policies, but I can't find the error. Enter image description here Enter image description here Enter image description here Enter image description here

help me, please

2 Answers
2
Accepted Answer

Hi,

please check CloudWatch logs for details about your rule execution (logging must be enabled for AWS IoT Core).

Your payload has temperature and humidity as keys. What is your primary key in DynamoDB? Every primary key identifies every item uniquely. Temperature or humidity can have the same value over time and cannot be considered to be unique.

To generate a unique key from your SQL statement you could use something like

SELECT newuuid() as prim_key, * FROM 'mytopic'

Cheers,

Philipp

AWS
EXPERT
answered 2 years ago
0

I added the variable "Time" to my message and set it as my partition key and finally I have data in my table. Enter image description here Enter image description here Enter image description here Enter image description here

answered 2 years ago

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