Greengrass Lambda, external packages

0

I am trying to install additional libraries in my function inside my Greengrass core device. The libraries that I'm installing unfortunately are heavier than 50MB which is the hard requirement for a Lambda function.

I was looking into deploying layers to my function, but I read here: https://stackoverflow.com/questions/63959413/are-lambda-layers-supported-for-lambdas-deployed-to-greengrass. That layers are not supported for functions deployed at the Edge.

Would there be another way to work with libraries inside of a function?

Ed
질문됨 일 년 전213회 조회
2개 답변
1

I'd recommend that you do not use Lambda. Instead, write a native Greengrass v2 component which can have artifacts up to 2GB.

https://docs.aws.amazon.com/greengrass/v2/developerguide/create-components.html

Follow this tutorial for an example: https://docs.aws.amazon.com/greengrass/v2/developerguide/defer-component-updates-tutorial.html

Cheers, Michael

AWS
전문가
답변함 일 년 전
0

Thank you for responding Michael, I greatly appreciate.

For my thesis, I need to experiment the performance of pinned versus non pinned Lambda functions, in other words, long-running vs on demand.

To the best of my knowledge, this is not something that a native component can provide out of the box (but maybe I'm mistaken).

Therefore, that is why I need to be sticking to lambda for now.

Best, Ed

Ed
답변함 일 년 전
  • Why do you need that? Native components will have the best performance possible because it is just running exactly the code that you write. Lambda in not efficient as it requires an extra runtime as well as work distribution server which is not really lightweight.

  • Thanks for replying Michael,

    I would really want to incline for the native components in v2, but I am just a bit confused on the benefits.

    It is my hypothesis that a long-running process (either native or pinned functions) would be more energy consuming than an on demand event-driven process.

    Therefore, I want to experiment both the performance and the energy consumption of both scenarios, one where the code is running all the time, and the other one where it is only running on-demand.

    As a result, this may be only possible with lambda functions, with the options of pinned versus non pinned (to the best of my knowledge).

    I would be very eager to explore the option of accomplishing this on native components in v2, but I am not sure if it would be too complicated for the scope of the thesis.

    Once again, I appreciate this support! Thank you for sharing your knowledge.

    Best Ed

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

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

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

관련 콘텐츠