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 Answer
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
answered 2 years ago

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