claudia updateseems to basically require
node_modulesto have all your modules in the lambda zip file, which effectively renders tree-shaking useless
--use-local-dependenciesflag. That will use your local dependencies instead of doing the re-install.
--config claudia-prod.jsonoption to do that).
I have a lambda that uses a layer (sharp) that requires specific Linux binaries for lambda.
What's the best way to deploy this using claudiajs?
I'm using TypeScript and during local development I have the sharp library as a devDependency.
When it's running in AWS, it'll resolve
import sharp from 'sharp'
from the layer and when locally, from the devDependency.
But if I try to deploy it fails because it cannot find sharp.
In the docs it talks about using --use-local-dependencies for a similar use case where binaries are needed for a different platform but I can't see how that works with layers where that dependency will never be directly within the lambda's own node_modules