How to connect to IoT Core by IAM (access key id / pwd)

0

hello,

i'm trying to connect to AWS IoT Core from my PC using mqtt client tools. (like, MQTT.fx, mqttbox)

I can connect successfully by certificate mode.

But I cannot connect by user id / pwd mode. (IAM user access key id, access key pwd)

Let me know how to configure AWS settings or mqtt client settings.

1 回答
0

Hi, thanks for the question! In order to use IAM credentials, the SigV4 process is used. Since this is not supported in the MQTT protocol overall, it is accomplished by establishing a connection via MQTT over websocket. The full list of communication protocols can be found here.

You can see this in action here. This is a Python example that uses publish/subscribe. By setting the --use-websocket and --signing-region arguments, normal IAM credentials can be used. For example, by setting environment variables.

Let us know if this is helpful!

AWS
Gavin_A
已回答 2 年前

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

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

回答问题的准则