MQTT Connection time out exception when using Cognito Credentials.
See original GitHub issueI tried to connect to the AWS IoT MQTT with credentials fetched through a cognito identity and the following exception is received.
Connect timed out
Traceback (most recent call last):
File "C:/Users/Software/Desktop/Test folder for Kivy/mqtt with cognito.py", line 161, in <module>
myAWSIoTMQTTClient.connect()
File "C:\Users\Software\Desktop\Test folder for Kivy\venv\lib\site-packages\AWSIoTPythonSDK\MQTTLib.py", line 513, in connect
return self._mqtt_core.connect(keepAliveIntervalSecond)
File "C:\Users\Software\Desktop\Test folder for Kivy\venv\lib\site-packages\AWSIoTPythonSDK\core\protocol\mqtt_core.py", line 199, in connect
raise connectTimeoutException()
AWSIoTPythonSDK.exception.AWSIoTExceptions.connectTimeoutException
Process finished with exit code 1
The same code is working when a normal IAM credential is used to connect to the MQTT service. The policies attached for the Cognito identity and IAM credential are the same(AWSIoTFullAccess).
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
MQTT Connection time out exception when using Cognito ...
I tried to connect to the AWS IoT MQTT with credentials fetched through a cognito identity and the following exception is received.
Read more >Diagnosing connectivity issues - AWS IoT Core
Make sure that there is a policy attached to the certificate you are using to call AWS IoT. All publish/subscribe operations are denied...
Read more >Consistent timeouts on AWS IoT - Stack Overflow
Turns out the issue is that you need to: have both a policy and a certificate in the console; explicitly associate them to...
Read more >AWS iot MQTT connection timeout error
Hi guys, I have been trying to get my CY8CPROTO-062-4343W board to AWS but currently failing at the MQTT connection stage.
Read more >class IoT. Client - Boto3 Docs 1.26.33 documentation - AWS
For information about how to use the credentials provider for IoT, ... The timeout interval can be anywhere between 1 minute and 7...
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

Greetings! It looks like this issue hasn’t been active in longer than a week. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one, also please try V2 as this might be solved there too.
Greetings! It looks like this issue hasn’t been active in longer than a week. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one, also please try V2 as this might be solved there too.