Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get IoT topic when redirecting to SQS in AWS

Is there any way I can get topic name in SQS queue when messages were redirected from AWS IoT?

like image 997
pixel Avatar asked Dec 02 '25 07:12

pixel


1 Answers

You can use the sql function topic() in the SELECT statement of the IOT rule.

Something like SELECT * as data, topic() as topic FROM 'your topic'

IOT sql function reference http://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-functions.html#iot-function-topic

like image 127
cementblocks Avatar answered Dec 05 '25 04:12

cementblocks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!