Invoking a lambda function from core device



I am developing a device that does image classification on a Raspberry Pi after a user clicks a certain item on the touch screen menu. I liked the idea of using Greengrass to deploy the lambdas and models at scale and update them synchronously.

In my model, RPi is a core and I don't have any devices, as its camera is accessible as lambda is not containerised.

Currently I'm able to invoke the lambda function for classification from the IoT console with a MQTT message (basically, I followed the optimizedImageClassification tutorial). However, I don't understand if it is at all possible to invoke a lambda function from the core.

I was assuming I can just use invoke from aws-lambda, but it seems to be much more complicated. The only solutions I have found are related to assist in serverless development. I was also thinking of sending an MQTT request from the core to core but it seems to be unnecessarily complex.

Is there a right way to invoke lambdas from core device on user request? Or am I using the technology wrong? Thanks.

asked 3 years ago401 views
2 Answers

Just checking that you guys didn't forget about me

answered 3 years ago


Thanks for reach out.

There are 3 popular ways to invoke lambda:

  1. MQTT from IoT console -> Lambda deployed on GreengrassCore device. (The way you did)
  2. Lambda1 deployed on GreengrassCore device-> Lambda2 deployed on GreengrassCore device. (Basically you can have a long-running lambda1 to trigger your lambda2)
  3. IoT Device(GGAD, known as Greengrass Aware Device) -> Lambda. (See details in

Regarding to your general questions:

  1. We don't support lambda got invoked by core directly.
  2. aws-lambda(the one in lambda console and not being deployed on Greengrass) trigger lambda deployed on GreengrassCore device is NOT a good way, you should try other alternative ways.


answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions