- Newest
- Most votes
- Most comments
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:
- https://github.com/aws/aws-iot-device-sdk-python-v2/blob/main/samples/websocket_connect.md
- https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/samples/node/websocket_connect/README.md
Or to publish using HTTPS, you can use the regular SDKs. Here are the relevant Python and JS SDK methods:
- https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iot-data/client/publish.html
- https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iot-data-plane/classes/publishcommand.html
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.
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
Relevant content
- asked 9 months ago
- asked 2 months ago
- asked a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago