Reputation: 1300
I have created a rule in AWS IoT.
This rule is very simple: AWS IoT receive a message from MQTT device and storage it in a DynamoDB table.
The problem is that the system receive without problem the message but after that the rule does not sent it to DynamoDB.
This is my topic
This is my rule
This is what I can see in CloudWatch (not sure if this is about the same problem)
what could be wrong?
Thanks!
Upvotes: 0
Views: 455
Reputation: 326
When you use custom Topics, it has to be updated in your policy click 'edit policy document' and add your topic and topic filter under resources.
Upvotes: 0
Reputation: 1300
The solution is to publish the message in JSON format from Mosquitto:
mosquitto_pub --cafile rootCA.pem --cert certificate.pem.crt --key private.pem.key -h XXXXX.iot.eu-west-2.amazonaws.com -p 8883 -q 1 -d -t topic -m {\"message\":\"3\"}
where message have to be the name of the primary key
Upvotes: 1