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?

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions