faast.js
faast.js copied to clipboard
Use lambda layers for implementing `addZipFile` and `addDirectory`
Currently CommonOptions.addZipFile
and CommonOptions.addDirectory
add files into the code package that is uploaded directly. There is a 50MB limit on AWS for the code package. Lambda Layers allows us to increase this limit to 250MB.
We should use Lambda Layers to implement these options. A separate layer can be created for each value (there is a limit of 5 layers for each function), then all can be added to the function. Layers are already used for implementing packageJson
so this should be relatively straightforward, as the garbage collector should work as-is if we follow the faast-*
naming convention.
This also needs to align with the layer caching strategy in #3