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.

demandé il y a 3 ans437 vues
2 réponses
0

Just checking that you guys didn't forget about me

répondu il y a 3 ans
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
répondu il y a 3 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions