Closed mapo-job closed 3 years ago
Yes, it's tested with AWS IoT and working.
But there should be a tricky setup in your AWS Console. In short - you should create a policy with proper actions allowed and attach that policy and thing to your certificate.
If you need a step-by-step guide - see here: https://flespi.com/kb/flespi-to-aws (until the "Flespi AWS stream configuration" step).
After doing the steps described in that article you will get an MQTT broker at your uri = "abcdef.123.iot.us-east-1.amazonaws.com"
, which can accept connection from any MQTT client, like luamqtt.
Your secure={...}
table in your Lua code is correct except that "cafile" is usually "root-CA.crt", not "root-CA.pem", but you should adjust it according to your file names.
Just starting with Iot, thanks for the clarification. The demo has a default policy on topic "topic_1" and resource client/sdk-nodejs-. Just added "arn:aws:iot:us-east-1:############:client/lua-" solve the problem.
Thanks
can this be closed?
label:Question
Hi, I tried the simple client with TLS enable with correct credential information but it does not work. I'm new to lua so not sure how to troubleshoot. I have the nodejs example working but the lua script does not connect. The original lua script is working.
Result:
Code change: