- Newest
- Most votes
- Most comments
Hi! There are a couple approaches you can take. If the Lambda just needs to publish a message, you can POST via HTTPS. Grant the Lambda function's IAM role the iot:Publish
action, and use HTTP on port 443 as noted here using Signature v4.
If the Lambda also requires to subscribe to an MQTT topic, then an X.509 certificate for mTLS or an MQTT over WebSocket connection can be used.
No changes needed on the devices subscribing to the topic.
The simplest approach is to then trigger another lambda function in response to dynamo streams:
https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#
You could also into eventbridge pipes. Your source will be the stream and your target could any of those: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html
Relevant content
- asked 4 years ago
- Accepted Answerasked 2 years ago
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
It should only post message to the broker which the exenternal IoT devices could subscribe on. So i need to add this in my code ? or create a new thing in IoT Core?
No need to create a Thing, certificate, or IoT policy in IoT Core in that case. The only IAM resource needed is
iot:Publish
. Here is an example of doing this in boto3 (Python) and Node.js. And Rust example too. If you could accept the answer if this does address your question, much appreciated.