# AWS Cloud MQTT IOT connection Problem

**URL:** <https://discourse.nodered.org/t/aws-cloud-mqtt-iot-connection-problem/12892>\
**Category:** General\
**Created:** [4 July 2019 08:49 UTC](https://discourse.nodered.org/t/aws-cloud-mqtt-iot-connection-problem/12892 "2019-07-04T08:49:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RoundTriangle](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@RoundTriangle](https://discourse.nodered.org/u/RoundTriangle)\
**Post date:** [4 July 2019 08:49 UTC](https://discourse.nodered.org/t/aws-cloud-mqtt-iot-connection-problem/12892/1 "2019-07-04T08:49:28Z")

</div>

Hello NODE-Red- Forum!

Not sure if this is a node red problem, but maybe someone has experience with it.  
Its like a kind of Hybrid ..

I want to connect with Node-red via the mqtt node to the aws IoT. I use a Simatic IOT2040 which has actually a Arduino Uno in it with node-red. I have also a Temperature Sensor connected to it, which i want to stream.  
But i run out of ideas and cant get it work.  
What have I tried yet:  
For the aws Cloud.

I followed step by step this guide:

[https://docs.aws.amazon.com/iot/latest/developerguide/iot-gs.html](https://docs.aws.amazon.com/iot/latest/developerguide/iot-gs.html)

- registry my IOT
- downloaded the certificate public, private, the certificate as well as the root CA.
- create first txt file, write the rootCa in it, save it as pem file.

- 
  - via WinSCP on my Simatic /home/root/... folder

  - activate it

  - Attached it to my Simatic

-create policy  
--Action iot:\* Resource ARN \*  
--Attach it to my certi  
As well with configure a device Linux & node.js

- 
  - with the download kit on the device

  - add permissions chmod +x start.sh

  - ./start.sh

installed this nodes:

> **[node-red-contrib-aws-iot-hub](https://flows.nodered.org/node/node-red-contrib-aws-iot-hub)**
>
> An aws-iot-hub node for Node-RED

  
Sending but not incoming at the cloud

In Node-Red:  
First i tried it with the default mqtt broker  
Server: The Endpoint Http  
Port:8883  
Enable Secure SSL/TLS configuration:

- Certificate: on my Simatic /home/root/... folder the Certificate file ending .pem

- Private key:on my Simatic /home/root/... folder the Certificate file ending xxxprivate.key

- CA Certificate; on my Simatic /home/root/... folder the 'manual' with txt file created CA root file.

Notice ; No Errors --\> Started "Connecting" but never is "Connected"

For testing i just typed "payload" in the topic in the Cloud as well in the nodes and ot should give me to the sensor values.

So, what am I missing?

Kindly regards!

RoundTriangle

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [4 July 2019 10:06 UTC](https://discourse.nodered.org/t/aws-cloud-mqtt-iot-connection-problem/12892/2 "2019-07-04T10:06:16Z")

</div>

Have you looked at the open issues for the AWS node?  
Try comparing your policy against the one that the user got to work (in issue 1) (with the standard MQTT node)

---

<div class="post-metadata">

**Author:** ![RoundTriangle](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@RoundTriangle](https://discourse.nodered.org/u/RoundTriangle)\
**Post date:** [5 July 2019 05:14 UTC](https://discourse.nodered.org/t/aws-cloud-mqtt-iot-connection-problem/12892/3 "2019-07-05T05:14:17Z")

</div>

I swear.. I have nothing changed... But now it works..  
Sometimes programming take, sometimes programming give you something.

But Thank You for your quick answer!

---

<div class="post-metadata">

**Author:** ![jhabrajesh](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@jhabrajesh](https://discourse.nodered.org/u/jhabrajesh)\
**Post date:** [3 April 2020 16:34 UTC](https://discourse.nodered.org/t/aws-cloud-mqtt-iot-connection-problem/12892/4 "2020-04-03T16:34:41Z")

</div>

I was having similar issue with the node-red standard mqtt node. I updated the Policy to make the policy (on AWS IOT end) more permissive and it worked.Then I got into the issue of connection-disconnection state which was solved by changing the QoS on the Out node to 0. it was 2.
