Why do we have AWS IoT Events when AWS IoT core rules offers similar service

842 views Asked by At

AWS IoT Events: A fully managed service that makes it easy to detect and respond to events from IoT sensors and applications.

The same can be achieved using AWS IoT core rules. For example - rule to trigger a lambda function and publish to certain topic.

What is the use case of AWS IoT Events vs AWS IoT Core (rules)?

1

There are 1 answers

0
Hoejrup On

Just found the IoT Events service after battling with IoT Core rules.

  1. IoT Core rules seems to be unable to directly do boolean operations and thus respond to different content of payloads. The rules simply transfer (part of) the message to another service.

I want to respond to an alarm state from an IoT device, while having a keep alive signal. How to do this with a rule in the IoT core? I could not find a way to directly do this. My first instincts were to use a Lambda function and just do the filtering and such from this. However it has a soft limit of 1000 concurrent functions. And seeing that I am going to be running probably around 10k IoT devices with a 2 m keep alive, it seems to be a tad misplaced to be using a Lambda rule to perform filtering. Also how would you do the keep alive? Perhaps using a dynamoDB stream triggering a lambda function for the alarm state, while running a recurrent lambda function to check the keep alive.

  1. IoT Events directly support timers and boolean operations. Hence, I can implement my keep alive timer and alarm trigger in IoT events (triggered by an IoT core rule). Hence, I don't have to deal with dynamoDB streams triggering lambda functions, or recurrent lambda functions, er EC2 instances (or however else you would implement it).

Now, since I have done the boolean operations/filtering in IoT events the Lambda functions would only be invoked when an alarm is triggered, or the keep alive dies. I need to invoke a Lambda function from the IoT event to send (high priority) push messages to a unique mobile device/user (since IoT events to SNS does not seem to support this at the moment, where only a topic can be sent to). This is perhaps another story.

Some other examples from IoT Events docs are: https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-examples.html

HVAC temperature control

Cranes

Event detection with sensors and applications

Device HeartBeat

ISA alarm

Simple alarm