简体   繁体   English

AWS IoT规则DynamoDB

[英]AWS IoT rule DynamoDB

I have created a rule in AWS IoT. 我已经在AWS IoT中创建了一条规则。

This rule is very simple: AWS IoT receive a message from MQTT device and storage it in a DynamoDB table. 该规则非常简单:AWS IoT从MQTT设备接收消息,并将其存储在DynamoDB表中。

The problem is that the system receive without problem the message but after that the rule does not sent it to DynamoDB. 问题是系统可以毫无问题地接收到消息,但是之后规则不会将其发送到DynamoDB。

This is my topic 这是我的话题

话题

This is my rule 这是我的规则

规则1

规则2

This is what I can see in CloudWatch (not sure if this is about the same problem) 这是我在CloudWatch中看到的(不确定是否存在相同的问题)

的CloudWatch

what could be wrong? 有什么问题吗?

Thanks! 谢谢!

The solution is to publish the message in JSON format from Mosquitto: 解决方案是从Mosquitto以JSON格式发布消息:

  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 其中message必须是主键的名称

使用自定义主题时,必须在策略中对其进行更新,请单击“编辑策略文档”,然后在资源下添加主题和主题过滤器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM