AWS SDK for pandas Lambda Layer size #1727
Replies: 2 comments 6 replies
-
Hey, We have encountered this error, yes. An issue for us here is how to reduce the layer size while keeping all our crucial dependencies. Out of the 154 MiB that our Lambda layer takes up (Python 3.9, x64, version 2.17), this is breakdown of our largest dependencies:
As you can see, the main problem is that even if modularized, Pandas with it's dependencies is still responsible for the bulk of the layer size. I will speak to the team, however, to see if they have any other ideas for what we can do. Best regards, |
Beta Was this translation helpful? Give feedback.
-
@LeonLuttenberger One big issue for me is the reliance on the provided lambda layers. In one of my projects I am required to install a package that has numpy as a dependency. Hence, numpy is included twice. Once in the awswrangler layer and once in my own layer. Is it possible to create an awswrangler package that can be added via pipenv, poetry, etc. that has the same package size as the lambda? |
Beta Was this translation helpful? Give feedback.
-
Ever seen this message?
This is what you see if you try to use the (fka) AWS Wrangler Lambda Layer plus an additional heavy layer, like OpenTelemetry or DataDog. Often a Lambda function needs only a small piece of all that delicious wrangler functionality, so I wonder if it would be possible to modularize the AWS SDK for pandas and split the Lambda Layer into smaller layers, à la carte?
It seems as this open source project grows, the size of the Lambda Layer will increase. Potentially I could try to upgrade to a new Layer version and find that I've bumped up against the layer size limit.
Beta Was this translation helpful? Give feedback.
All reactions