Publish to IoT Thing from Lambda Javascript Example

0

Hi folks. We have developed an IoT application and all is going great with the receiving of messages from our IoT Device to trigger Lambda's. The next step is to Publish messages from a Lambda to the device using JavaScript. I can successfully Publish back to the device using the Test option from the web console. I can't seem to find JavaScript sample Lambda code that shows how to connect to a specific Thing and then Publish to it. Would also need to understand the security required for the Lambda connection to the Thing (ie. does the Lambda have to load the same certificates used by the IoT Device).

I appreciate any help.

Thanks. Grant.

Grant
已提问 1 年前457 查看次数
1 回答
1

You will need to use the NodeJs SDK and import the module IotData.

Look at below and use the publish method to send data to the associated topic and payload:

profile picture
专家
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则