Connecting to AWS-IoT
See original GitHub issueHello,
I am trying to use your MQTT client to connect to AWS-IoT using a presigned websocket url as outlined here: http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html.
Here is my connection code (creds.presignedUrl contains the authentication headers needed as a query string):
string CLIENT_ID = "notifications-test-mqtt-" + (new Random()).Next(1, 100000);
var client = new MqttFactory().CreateMqttClient();
var options = new MqttClientOptionsBuilder()
.WithWebSocketServer(creds.presignedUrl)
.WithClientId(CLIENT_ID)
.Build();
MqttClientConnectResult res = await client.ConnectAsync(options);
The issue is that client.ConnectAsync(options) never completes, it fails with a MQTTnet.Core.Exceptions.MqttCommunicationTimedOutException after about 10 seconds.
Any suggestions? Is what I am trying to do possible?
Thank you, Rowan
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Connecting to AWS IoT Core
AWS IoT Core supports connections with IoT devices, wireless gateways, services, and apps. Devices connect to AWS IoT Core so they can send...
Read more >Connecting devices to AWS IoT
Devices connect to AWS IoT and other services through AWS IoT Core. Through AWS IoT Core, devices send and receive messages using device...
Read more >Tutorial: Connecting a device to AWS IoT Core by using the ...
This tutorial demonstrates how to connect a device to AWS IoT Core so that it can send and receive data to and from...
Read more >Connect policy examples - AWS IoT Core
The following policy denies permission to client IDs client1 and client2 to connect to AWS IoT Core, while allowing devices to connect using...
Read more >Try the AWS IoT quick connect
In the AWS IoT console home page, on the left, choose Connect and then choose Connect one device. AWS IoT console home page...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thank you. I will have a look. We also have a bug in WebSocket handling probably it is related and will be fixed in the next version.
Hm, i’ve got the same URL from both JS and the mobile client, and have all the comments here. But its still not connecting. Was there any special settings in AWS need to make this work?