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
asked a year ago207 views
2 Answers
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
EXPERT
answered a year ago
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
answered a year ago
  • 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

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