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.

질문됨 3년 전437회 조회
2개 답변
0

Just checking that you guys didn't forget about me

답변함 3년 전
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
답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠