# Connecting with AWS IoT Core Using WebSocket Protocol

**URL:** <https://discourse.nodered.org/t/connecting-with-aws-iot-core-using-websocket-protocol/37622>\
**Category:** General\
**Created:** [17 December 2020 07:35 UTC](https://discourse.nodered.org/t/connecting-with-aws-iot-core-using-websocket-protocol/37622 "2020-12-17T07:35:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gtmanoj235](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@gtmanoj235](https://discourse.nodered.org/u/gtmanoj235)\
**Post date:** [17 December 2020 07:35 UTC](https://discourse.nodered.org/t/connecting-with-aws-iot-core-using-websocket-protocol/37622/1 "2020-12-17T07:35:48Z")

</div>

I'm trying to connect to AWS IoT Core using MQTT, WebSocket and HTTPS communication protocols.

Here I'm using Node-Red as an IoT Device simulator. While doing this I'm able to successfully connect using both MQTT and HTTPS protocol but WebSocket connection is not working.

_ **MQTT EndPoint:** _ xxxx..amazonaws.com:8883

_ **HTTPS EndPoint:** _ [https://xxxx](https://xxxx)..amazonaws.com:8443/topics/iot%2Ftelemetry?qos=1

_ **WebSocket EndPoint:** _ wss://xxxx..amazonaws.com:443/mqtt

**Error in Node-Red Console when I try to publish a message to AWS IoT Core using WebSocket protocol**

`"An error occurred while sending: Error: WebSocket is not open: readyState 3 (CLOSED)"`

The above error clearly states that Node-Red is not able to establish the WebSocket connection due to incorrect configuration.

Can anyone who has connected to AWS IoT Core using WebSocket protocol share some pointers here?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 February 2021 07:35 UTC](https://discourse.nodered.org/t/connecting-with-aws-iot-core-using-websocket-protocol/37622/2 "2021-02-15T07:35:57Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
