java - AWS Lambda Package Native Executable with JAR -


i have app runs on jvm, provided fat jar. needs invoke native linux binary, example ffmpeg. directory structure zip file need contain in order package both jar , executable together? cannot find documentation, code examples using build tools have not worked with.

let's pretend name of lambda blah. hoping answer like:

deployable jar contains:   + blah/  # contains fat jar   + lib/  # contains ffmpeg 

here bash script wrote not work. puts fat jar , native executable in dist/ directory before zipping them together.

fatjar=blah-assembly-0.0.4.jar mkdir -p dist/ rm -f dist/* rm -f $deployed_zip cp $fatjar dist/ cp /usr/local/bin/ffmpeg dist/ (cd dist && zip -r $fatjar ffmpeg && mv $fatjar ../$deployed_zip) 

any structure of zip file long native binary included in package appears in path or invoked through full path. in both cases means must update java code in 1 of following ways:

  1. modify path environment variable or
  2. call binary full path.

as of writing path of directory package contents extracted on aws lambda system can read lambda_task_root environment variable.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -