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

已提問 1 年前檢視次數 951 次
2 個答案
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
專家
Greg_B
已回答 1 年前
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
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南