I have followed the following guide successfully except for testing with AWS IoT Core (subscribe to a topic)
Implement a Connected Building with Amazon Alexa and AWS IoT
Near the end of the document it says to go to AWS IoT Core, and choose the Test tab. Subscribe to the setTemp topic.
I did that and I can't see the messages coming from the Alexa console (Navigate back to the AWS IoT Core test console to see the message)
I understand that configuring AWS IoT involves creating an object and adding a policy, but similarly it doesn't work.
I have the impression that the document is incomplete and something else I must do.
Any comments or suggestions are welcome
(1) The first step is to look at the Cloud Watch logs. There will be clues about where the call failed.
(2) I am not sure if you have enabled the custom logic function in the lambda authorizer. If you have, there is a bug in the code of the tutorial you have cited: After the line declaring the custom logic function, there should be a return statement or at least a 'pass' statement. Without this, the program will crash if you enable the function.
def customLogicFunction(token):
return True
(3) The tutorial has mixed up Python and JavaScript code. The lambda function that sends the MQTT message is in JS, whereas all other parts are in Python. Did you correctly configure the language while creating the lambda?!
(4) Verify your AWS region. Smart home skills work only for certain regions. If there is a region mismatch, the call will silently fail. See this link for allowed regions: