Hello,
I have built an Alexa skill that invokes an AWS IoT object to publish a payload to a specific topic - but I do not see any payloads published from within the Test section of the AWS IoT dashboard.
- The skill successfully exits when tested - no errors indicated anywhere inside the code.
- After the skill exits a test, I don't see the payload in the Test area of the AWS IoT dashboard
- The IoTData object is initialized without any errors:
var AWS = require('aws-sdk'); var iotdata = new AWS.IotData({endpoint: '************.iot.us-west-2.amazonaws.com'});
- I receive no errors from the following code:
var params = { topic: 'b827ebac1bba/commands', payload: '0', qos: 0 }; iotdata.publish(params);
- The IoTData object is initialized without any errors:
- The IAM policy role attached to the Lambda function allows iot:Publish:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": "arn:aws:logs:*:*:*" }, { "Effect": "Allow", "Action": "iot:Publish", "Resource": "*" }, { "Effect": "Allow", "Action": "logs:CreateLogGroup", "Resource": "arn:aws:logs:*:*:*" } ] }
Any idea on what I should try next?