Search code examples
amazon-web-servicesaws-iotaws-iot-analytics

AWS IOT analytics to trigger event when attribute changes state


Is it possible to detect if an attribute of an iOT message changed say from false to true and trigger an action? I would like to capture all status changes. I'm wondering if iot analytics is the right tool for this. Going through the tutorial it appears that choosing a delta time window and querying the data could trigger an event. The smaller the time window would be the more real time my alarm would be. One problem I see with this is that alarm would be repeatedly triggered.
Is this in the right direction?


Solution

  • There are a few options available, depending on what action you'd like to trigger and the specific conditions that should trigger it.

    • AWS IoT Rules are typically used for routing the incoming messages based on some condition (eg: if a certain attribute in the message is true or false). This is a "stateless" form of trigger, as each message is processed/routed independently.

    • AWS IoT Events may be better suited for a "stateful" trigger (eg: alarm when the first message is received with a change in the field value)

    • AWS IoT Analytics include another mechanism that can be used to react to specific conditions in the messages received ("stateless" trigger), in the form of the Lambda Activity that can be associated with a processing Pipeline