Beware of layers they can ultimately complicate your deployment, particularly if you have many lambdas dependent on a layer because any updates you make to that layer is not picked up by your lambdas unless you update each one to point to the new version and redeploy.
They also make testing your functions more difficult, harder to invoke when running locally (although this should be avoided anyway - use something like serverless stack to deploy to AWS but debug/run code locally - a game changer for us)
A good summary of pros and cons here - lumigo.io/blog/lambda-layers-when-...
I use npm packages in the layers (if I’m facing the situation on not viewing the code on prod). The handler and the shared code will be in the lambda. Also depends on how you structure the application. I faced several ways of structure the project .
I like the article I will added it into my bookmarks
I’m only make the layer on deployment time so locally with serverless offline and other plug-in (for example serverless Dynamo) works just fine.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Beware of layers they can ultimately complicate your deployment, particularly if you have many lambdas dependent on a layer because any updates you make to that layer is not picked up by your lambdas unless you update each one to point to the new version and redeploy.
They also make testing your functions more difficult, harder to invoke when running locally (although this should be avoided anyway - use something like serverless stack to deploy to AWS but debug/run code locally - a game changer for us)
A good summary of pros and cons here - lumigo.io/blog/lambda-layers-when-...
I use npm packages in the layers (if I’m facing the situation on not viewing the code on prod). The handler and the shared code will be in the lambda. Also depends on how you structure the application. I faced several ways of structure the project .
I like the article I will added it into my bookmarks
I’m only make the layer on deployment time so locally with serverless offline and other plug-in (for example serverless Dynamo) works just fine.