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?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠