Unable to run jsreport in aws lambda function!!



  • Hello,
    We are using the open version of jsreport in our project and we have deployed it to aws lambda function. The problem is we are getting error when it create. The code is developed in .NET Core 2.2 and C#

    Error:
    at System.IO.FileSystem.CreateDirectory(String fullPath) at System.IO.Directory.CreateDirectory(String path) at jsreport.Local.Internal.BinaryProcess..ctor(IReportingBinary binary, String cwd, Configuration cfg) at jsreport.Local.Internal.LocalUtilityReportingService..ctor(IReportingBinary binary, String cwd, Configuration configuration) at jsreport.Local.LocalUtilityReporting.Creat
    at System.IO.FileSystem.CreateDirectory(String fullPath)
    at System.IO.Directory.CreateDirectory(String path)
    at jsreport.Local.Internal.BinaryProcess..ctor(IReportingBinary binary, String cwd, Configuration cfg)
    at jsreport.Local.Internal.LocalUtilityReportingService..ctor(IReportingBinary binary, String cwd, Configuration configuration)
    at jsreport.Local.LocalUtilityReporting.Create()

    We tried setting the runtime directory and tempdirectory to aws “/tmp” folder but still we are getting the same error.

    Please help us resolving the issue.

    Is there any other way to make the jsreport run in aws lambda?

    Appreciate your help.



  • When running lambda, chrome needs to recompiled with the same os distribution lambda uses.
    This makes it problematic to run the jsreport.Local. It could maybe work, but it sounds to me like a bad idea even to try it.

    I would probably instead run jsreport as extra lambda function. We have a tutorial for it here
    https://jsreport.net/learn/aws-lambda-serverless
    And then invoke the extra reporting lambda function from your c# lambda function.
    Have you considered this approach?


Log in to reply
 

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