serverless-layers
serverless-layers copied to clipboard
package.exclude from the serverless.yml is being ignored
In the serverless.yml, I am specifying the following node modules to be excluded as part of the layer:
package:
excludeDevDependencies: true
exclude:
- node_modules/@aws-sdk/**
- node_modules/@azure/**
- node_modules/@baemingo/**
- node_modules/sqreen/**
- node_modules/sqreen-info/**
AWS SDK is around 50MB and is included by default in all lambdas, so it makes no sense to package it as part of the layer.
However, when the layer is being created it still includes the @aws-sdk folder from node_modules
Created layer package /Users/stanyeshchenko/Dev/projects/api-demo/.serverless/api-demo-nodejs-default.zip (88.9 MB)
Attaching a screenshot with layer that I downloaded from S3, you can see that aws-sdk is not excluded
