Would adding aws-s3-storage feature bump the zipped layer by 13MB?

  • I removed all the samples but the invoice one then added the node module for s3 and I am at 98 MB zipped. Welcome any tips on what I can slim down (learning about that too now). Thanks all.

  • 98MB is the zipped size of the jsreport application folder? Including the chrome? That is quite good.

    You can try to remove these files if you want to get it a bit smaller and faster to compress/decompress.


    We do this when preparing aws lambda package here.

  • Thanks for the fast response. I will give it a try again and repot back. For some reason, in the past, anytime, I got above around 86-90MB, lambda layer creation console then rejects it as being an expanded 260MB+

  • I just link here our AWS lambda tutorial, if you haven't check it already, I recommend to give it a try.

  • Yes, followed this carefully (it's well done) and have a 'hello world' running on the AWS console and using the test.js file. My original S3 issue was related to installing the S3 blobStorage feature locally and pushing it up to AWS but the lambda layer was being rejected due to size. Working on completing the process by having output go to an S3 bucket. Will give a try again tomorrow.

  • If I create a "plain-vanilla" Lamba Layer per the instructions on the AWS Serverless page, I get an 82MB package which gets accepted by the Lambba Layer CLI. With the added jsreports-aws-S3-storage, the package is 90MB and rejected as too large. This is before I make any additional package upgrades for npm package warnings (npm audit kind).

    Is there an absolute MB size that I shouldn't go over when Lambda Layer is zipped?

  • I think the limit is 250MB for the extracted zip. Maybe you really reach it with the additional jsreport-aws-S3-storage installed.

    Can you try to have one lambda layer with the basic modules (jsreport). And the second layer with jsreport-aws-S3-storage?

  • Still working on the size difference issue. One good note (to self and others), when testing the S3 storage feature, restart after installing extensions!

  • We can close this for now. I realized I was adding the "aws-sdk" in dependencies which was bloating the layer significantly. It is already included with lambda although best practice is to pin against a specific version. When I get some time, I will look at adding multiple layers or slimming puppeteer further. Thank you!

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.