Invoking a lambda function from core device

0

Hi,

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.

gefragt vor 3 Jahren436 Aufrufe
2 Antworten
0

Just checking that you guys didn't forget about me

beantwortet vor 3 Jahren
0

Hi:

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 https://docs.aws.amazon.com/greengrass/latest/developerguide/module4.html)

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.

Thx

AWS
beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen