faast.js icon indicating copy to clipboard operation
faast.js copied to clipboard

Use lambda layers for implementing `addZipFile` and `addDirectory`

Open acchou opened this issue 5 years ago • 1 comments

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.

acchou avatar Mar 05 '19 23:03 acchou

This also needs to align with the layer caching strategy in #3

acchou avatar Mar 05 '19 23:03 acchou