Let's say we have a device with sensors (eg. bunch of weather sensors like wind/air/hum/temp) and this device needs to report it's state to AWS IoT.
Let's say that every minute device would be publishing a bunch of readings as one big json:
{
"temp" : 10,
"wind: 100,
"humidity" : 98.3,
....
....
"metric98": 23456,
"metric99": 56789
}
I can see two ways to send these updates to AWS IoT:
- publish status to AWS IoT shadow service topic
$aws/things/super-weather-001/update
- publish them to an arbitrary topic eg.
mytopic/my-weather-data/super-weather-001
...
In both cases I will have to create a rule on AWS IoT which will later throw these metrics into DynamoDb or process them in any other ways.
Which topic ($aws/... or mine) is it better to use to publish the metrics?
ps. I am aware that AWoT Shadows service is very convenient to calculate deltas vs "desired" state. But the trick in my case, that for the regular "metrics" from the weather station (like temperature or humidity), I don't have a "desired" state. I am not going to be setting temperature on the device, only reading, thus no need in calculating deltas.