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

gefragt vor einem Jahr931 Aufrufe
2 Antworten
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
EXPERTE
Greg_B
beantwortet vor einem Jahr
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
EXPERTE
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen