add --symlinks flag to zip command #90
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for putting this project together, it is a great building block!
While trying to build a
geopandas
layer on top of this, I was hitting AWS's 250 mb unzipped size limit. While looking for places to trim some fat, I noticed that in thegeolambda
base layer, underlib
, the various.so.*
library files were actually duplicates instead of symlinks. By adding--symlinks
to thezip
command in the shell script, the symlinks are preserved, and I was able to shrink the unzipped base layer size from around 90 mb to 36 mb.geopandas
(as well as the largepandas
andfiona
deps) now just barely fits in with the rest of thegeolambda
python layer.I have done some very modest testing with the new base layer and it doesn't seem that AWS Lambda has any problems with the symlinks and everything works the same as before, but more testing may be required.