New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shrink lambda layer with strip command #884
Comments
You can also save another 15MB by deleting |
Thanks for the suggestion @mdavis-xyz, did you test the resulting layer in a Lambda function after running the command? In my test, running the below:
throws a Numpy import error when testing the output layer in Lambda:
|
Hmm. No I didn't test it. I just downloaded the layer zip, unzipped it on my local machine, and ran strip. I have seen some libraries don't like stripping of .so.*, but just .so files seems fine. I don't know why. (I don't know the difference between Maybe we need to play around with How can I test this? What's the best way to build this docker image? I tried |
Scripts in the In your case, I believe the test could be as simple as:
|
I just tested. Yes I reproduced your error. We can fix that by stripping Removing
(The Where do we add this? |
Now merged and will be available in the next release, thank you for the contribution |
The lambda layer can be reduced by another 17MB by removing debugging symbols from compiled binaries.
i.e. just add something like this to the dockerfile:
The text was updated successfully, but these errors were encountered: