AWS IoT Core MQTT Connect

0

When making an MQTT connection to AWS IoT Core, the connection is made through an X.509 certificate issued by AWS IoT Core. When connecting to AWS IoT Core from the server, can I use the AWS account IAM Access Key and Secret Key instead of the X.509 certificate file to connect to AWS IoT Core MQTT? Thank you

asked a year ago896 views
2 Answers
2

Hi. The AWS IoT Core message broker supports SigV4 authentication for HTTPS and for MQTT over WebSocket, but not for MQTT: https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html

You can make a WebSocket connection using the AWS IoT Device SDKs. Examples for Python and JS:

Or to publish using HTTPS, you can use the regular SDKs. Here are the relevant Python and JS SDK methods:

It's not possible to subscribe using HTTPS.

That all said, you may reconsider whether your server should even make an MQTT connection to AWS IoT Core. If you want to subscribe to receive messages, you should be aware that you're limited to 100 messages per second per connection. This will not scale as your device fleet grows. You might instead look to use AWS IoT Core rules engine to ingest into a storage service, or KDS or SQS to decouple your server.

profile pictureAWS
EXPERT
Greg_B
answered a year ago
0

From the documentation here, it appears that IAM access key authentication methods are not supported.
https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html

profile picture
EXPERT
answered a year 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