Question is a little cryptic and I am a noob on this tool but increasing the timeout period to 1 minute (only needs ~30 seconds) and memory for my lambda to 1024 mb helped a lot. I have other issues related to FS on lambda so not a complete solution.
weisisheng
@weisisheng
Posts made by weisisheng
-
RE: Problems with jsreport on serverless (lambda)
-
Any users tried using AWS S3 with a serverless setup?
This may be a bit OT but also part of more frequent use cases.
I have had some early success with pulling data from Dynamodb and once I am confident the code is good, will post for others to consider. However, I only need individual data records a few times since the reports I am developing are transactional and infrequent in nature.
Has anyone tried querying on AWS S3 using their "Select" feature which provides for very cheap moderately fast access?
Thanks in advance.
-
RE: Would adding aws-s3-storage feature bump the zipped layer by 13MB?
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!
-
RE: Would adding aws-s3-storage feature bump the zipped layer by 13MB?
Still working on the size difference issue. One good note (to self and others), when testing the S3 storage feature, restart after installing extensions!
-
how to loop over sample (local) data?
I've scoured the documents and SO forum and I can't seem to get the inputs right. I've tried to use {{this.foo}} but this doesn't work. The report renders but without the custom data inputs. Thanks in advance.
{{#each this}}
<div>
<span>Artist: {{artist}}</span></br>
<span>Song: {{song}}</span></br>
<span>Id: {{id}}</span></br>
<span>Price: {{priceUsdCents}}</span></br>
<span>Publisher: {{publisher}}</span></br>
</div>
{{/each}} -
RE: Would adding aws-s3-storage feature bump the zipped layer by 13MB?
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?
-
RE: Would adding aws-s3-storage feature bump the zipped layer by 13MB?
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.
-
RE: Would adding aws-s3-storage feature bump the zipped layer by 13MB?
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+
-
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.