Reputation: 2657
I need to run wdiff
from a JAR file. Locally, I do this by invoking a process that runs either the wdiff
binary manually installed on a Linux server or a wdiff.exe
located in a convenient nearby folder on Windows.
Now, I need to deploy to AWS Lambda, and can't rely on wdiff
(or its dependency, diff
) to be installed. So how can I get wdiff
to run on Lambda?
I guess there are two possible questions/solutions here:
Upvotes: 1
Views: 1604
Reputation: 2532
Create a Lambda layer with the binary you need. You can get /usr/bin/wdiff
from a runtime similar to the AWS Lambda one. In your case almost any linux would be fine. If diff
of any other dependencies are not installed, put then into the same layer.
Then you can call the binary inside the jar as a usual external program, for example with ProcessBuilder
Upvotes: 3