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 Respuesta
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
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas