MQTT Engine to AWS Core Connection

I am trying to connect an Ignition MQTT Engine module to an AWS IoT Broker. I have followed the instructions here:

https://docs.chariot.io/display/CLD80/Connecting+to+AWS+IoT+Core

I am unable to establish a connection. I receive the following message in the Ignition log handler:

|CirrusClient|13Apr2023 16:04:23| ||ME-a53398ee-c226-4d17: connect with retry failed due to Connection lost|

It looks like the engine is constantly attempting to connect with my AWS instance but the connection is being refused. Trying to figure out next steps. Can share any additional information required and any advice would be appreciated

Two common issues that would cause a connection lost as you see in your logs are:

  1. If you’re re-using an MQTT Client ID that collides with another client connecting using the same MQTT client ID. MQTT Client IDs must be unique. Please leave the MQTT Engine Client ID config field blank so Engine will generate a unique client ID for you.
  2. You have a Primary Host ID configured in the MQTT Engine General configuration tab, but do not have the proper retain actions defined in the policy attached to the IoT Core Thing/device. I recommend removing the Engine Primary Host ID if you have it configured to see if it resolves your issue. If it does and you want to use Primary Host ID, you will need to add the iot:RetainPublish action to your existing policy.

Thanks Nathan. I did as you recommended but there was no change.

I think it may have been an error in the certificate and key generation. When I created my first Thing, AWS created a connection kit. I used the certs in it when configuring the engine initialy. I went back and created a new Thing and manualy created the policy and certificates. After this, everything worked and I now have a valid connection.

Thanks for the quick response

Great! Thanks for getting back to me and I’m glad things are working as expected now. Please reach back out over the forum or support@cirrus-link.com if you run into any other issues. Thanks!