How to use AWS IoT rule engine locally at AWS IoT greengrass?

264 Views Asked by At
  1. Is there a way to use AWS IoT rule engine locally at AWS IoT greengrass?

  2. Is the rule engine a feature of AWS IoT core (cloud) only?

  3. Is a lambda function deployed to the local AWS IoT greengrass that subscribes to a topic and takes an action an equivalent of the AWS IoT core rules engine?

1

There are 1 best solutions below

0
On BEST ANSWER

Even though greengrass is an extension of IoT Core, there is no native rules engine component in the greengrass service, greengrass serves the purpose of eventually sending the data to IoT Core where you can use rules engine to trigger other cloud services.

If you're specifically looking into Lambdas which run on greengrass, these Lambdas are running on your hardware and not the cloud and hence need to be handled by you, either using subscriptions or active invocations (code invoke).

This is because when you create a deployment from the cloud, greengrass service will containerize the greengrass group that you configure and deploy it on the GG core device. Once the container reaches the Core device, it cannot be altered/managed from the cloud unless you make another deployment with modifications.

Also there are 2 types of lambdas, long lived (think of it as daemon processes) and on-demand (think of it as a code which has to be triggered manually) lambda. The only way to trigger an on demand lambda is either subscriptions or active invocation. There’s no native feature which triggers on-demand lambdas, it has to be in your code logic.