Connecting To iotCore through an authenticated cognito user

0

I'm attempting to establish a connection to the IoT Core broker using temporary credentials (access key/secret key/session token) in Python. Unfortunately, my current approach results in a timeout without clear error messages. I've experimented with different libraries like AWSIoTPythonSDK.MQTTLib, awscrt, and Paho (noticed Paho being used within AWSIoTPythonSDK), but none have been successful. To clarify, I'm looking to connect directly to the broker without involving any specific IoT things that I may have created.

I've come across suggestions that I might need to create an IoT Core policy and attach it to the Identity Pool role. I attempted this using the CLI (as there seems to be no option for it in the UI), but it hasn't yielded any positive results.

If someone could guide me on the correct approach to connect to the IoT Core MQTT broker using my temporary credentials from Cognito, it would greatly help avoid further troubleshooting headaches as it may be the case that I misunderstand the use case completely .

Thank you.

  • Hi Stuart, could you clarify where the Python code is running?

没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则