Publishing message from AWS Lambda to AWS IoT
问题 I am trying to publish message from AWS Lamba using Nodejs to AWS IoT . I have zipped the project and uploaded on to the AWS IoT below is the code snippet var awsIot = require('aws-iot-device-sdk'); var device = awsIot.device({ keyPath: 'keyfilepath', certPath: 'pem file path', caPath: 'root-CA.crt', clientId: 'iotTest7526532135', host: 'host id' }); device .on('connect', function() { console.log('connect'); device.subscribe('topic_3'); device.publish('topic_1', JSON.stringify({ message_id:23