1
votes

I have written a python code on local ubuntu environment but now i need to deploy it into AWS Lambda. In my code i am using java using shell command.

proc = subprocess.Popen(["java -jar jarfile.jar input_file output_file], stdout=subprocess.PIPE, stderr=subprocess.PIPE,shell=True)

Java is installed on ubuntu using

sudo apt install default-jre
sudo apt install default-jdk

Unlike python packages, java is installed globally. How will i build python deployment package that contains Java Library so that it can be used using Shell Command ?

1

1 Answers

1
votes

You should probably convert the Java code into another Lambda function, or just write a Java Lambda function that does nothing but call that Java code inside the jar file.

Deploy that as a separate Lambda function and invoke it from the Python Lambda function.