Skip to content Skip to sidebar Skip to footer

Using A NodeJS 4 Script From Python On AWS Lambda

The problem I have a Python script running on AWS Lambda. This script is using subprocess to execute a NodeJS 4 script. What have I tried subprocess.check_output('my-script.js')

Solution 1:

You cannot rely on node existing on the Lambda python runtimes. AWS might remove or change it any time.

It would be best if you just translate them into one language so you only need one runtime. Either translate the node script into python or translate the python script to node.

If translation is not feasible, you can create two Lambda functions -- one in Python and one in Node. You can then have the Python Lambda invoke the Node Lambda using .invoke()


Post a Comment for "Using A NodeJS 4 Script From Python On AWS Lambda"