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 年前檢視次數 456 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南