Yes, thanks! Perhaps not the perfect solution, but it works.
We keep an eye on execution times of the lambda.
Thanks again!
Yes, thanks! Perhaps not the perfect solution, but it works.
We keep an eye on execution times of the lambda.
Thanks again!
At first we tried it without SNS (only S3) and we expected the behavior you described. But only if the Lambda made a cold start it uses the newest version of the template from S3. When the lambda is warm, then it continues to use the version from the first start. Is there any kind of caching we can disable?
Every start of the lambda leaves more files in "/tmp":
/tmp/core.headless-chromi.57
/tmp/core.headless-chromi.93
/tmp/headless-chromium
/tmp/jsreport/autocleanup/c67d9130-978d-411a-a740-42c2e40ea34b-chrome-pdf.html
/tmp/jsreport/autocleanup/ecbbb725-a1ab-4580-a7c7-837a712b31d4-chrome-pdf.html
/tmp/jsreport/core/locations.json
Perhaps if we delete the right one we can force him the fetch the newest version from S3?
Thanks for your help!
Hello,
this is our simplified config:
When we change a template in out local instance of jsReport, we can see a message in the SQS queue of the lambda waiting. When the lambda is started it will fetch the message, but it will use the old version of the template. Only the second call of the lambda takes the changes into account. I think jsReport in a Lambda renders first and processes the messages from SQS afterwards.
Can the behavior be changed?
Is it even a good idea to use SNS with SQS in a Lambda? I think every cold start of the Lambda will generate a new SQS queue and a new SNS subscription. How can we synchronize without SNS?
Thanks!
Christian
@jamesamurr-bind No, I did not try the trial. But I was able to "simulate" the result when I put the Base64 encoded image string into the docxtemplate demo.
@jamesamurr-bind I required the commercial version of docxtemplate (not jsreport) because of the image module, which is only available in the commercial version: https://docxtemplater.com/demo/#image
Thank you! This was the solution for my problem. You need the commercial version of docxtemplater, but it works in the online demo.
Hi,
is it possible to render a chart with jsreport, write it into the sampled data object (Base64 encoded) and use it in a second step for docxtemplater (with the Image Module)?
Thanks!!
Christian