You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I was trying to develop a lambda function which will connect to the AWS thing and publish an MQTT message, I want to receive these published messages on a raspberry Pi which is connected to the thing as well, and subscribed to the same topic. I managed to create the thing, certificate and connect to it. But the lambda function seems to not send the MQTT message. I am attaching my sample code here in the index.js. I kept all my certificates and keys in a folder and zipped and uploaded. Since I am testing this lambda function now, I am not using the event to trigger the connection and message publishing, I just did it like whenever the function is called , it will connect and publish the message. The function seems to be running without error, but I dont see any message coming to my Pi when this runs, (I have a python code running at the Pi side which is subscribed to the same topics, and it is connected to AWS as well).
Below is the lambda code I am using, could anyone please help me if I am missing something here ?
var awsIot = require('aws-iot-device-sdk');
var deviceName = "Bibin_Pi_3"; // Updated by Bibin from AWS IOT Thing name
when i do test my lambda function.....
i get this error
"errorMessage": "Invalid connect options supplied.",
"errorType": "Error",
"stackTrace": [
"Object.Module._extensions..js (module.js:579:10)",
"Module.load (module.js:487:32)",
"tryModuleLoad (module.js:446:12)",
"Function.Module._load (module.js:438:3)"
what it mean? where do i fix this..?? and how
help me to fix this
i have almost complete
Hi I was trying to develop a lambda function which will connect to the AWS thing and publish an MQTT message, I want to receive these published messages on a raspberry Pi which is connected to the thing as well, and subscribed to the same topic. I managed to create the thing, certificate and connect to it. But the lambda function seems to not send the MQTT message. I am attaching my sample code here in the index.js. I kept all my certificates and keys in a folder and zipped and uploaded. Since I am testing this lambda function now, I am not using the event to trigger the connection and message publishing, I just did it like whenever the function is called , it will connect and publish the message. The function seems to be running without error, but I dont see any message coming to my Pi when this runs, (I have a python code running at the Pi side which is subscribed to the same topics, and it is connected to AWS as well).
Below is the lambda code I am using, could anyone please help me if I am missing something here ?
var awsIot = require('aws-iot-device-sdk');
var deviceName = "Bibin_Pi_3"; // Updated by Bibin from AWS IOT Thing name
var thingShadows = awsIot.thingShadow({
keyPath: './private.pem.key',
certPath: './certificate.pem.crt',
caPath: './rootCA.pem',
clientId: deviceName,
region: "eu-east-1",
});
var ctx = null;
exports.handler = function (event, context) {
ctx = context;
};
The text was updated successfully, but these errors were encountered: