jsreport forum

I see, the size limit is apparently calculated with all layers.

The problem is that the aws-sdk, which is used in s3 persistence extension, has 80 MB. I was able to fit to the size limit when removing aws-sdk files that aren’t used.

This is the glob what to remove

node_modules/**/aws-sdk/apis/!(metadata.json|s3-2006-03-01.min.json|s3-2006-03-01.paginators.json|s3-2006-03-01.waiters2.json|sts-2011-06-15.min.json|sts-2011-06-15.paginators.json),
node_modules/**/aws-sdk/clients/*.ts,
node_modules/**/aws-sdk/clients/!(s3.js|sqs.js|cognitoidentity.js|sts.js),
node_modules/**/aws-sdk/dist,
node_modules/**/aws-sdk/dist-tools,

You can place the code here
github.com/jsreport/jsreport-aws-lambda-starter-kit/blob/master/createLambdaLayer.js#L67

Read more here: Source link