This is the line in my Lambda function that's raising an error:
// running in Node 8
const { execSync } = require('child_process');
execSync('curl https://github.com');
I'm trying to upgrade my Lambda function from Node 8 to Node 10 or Node 12, since Node 8 on Lambda is being deprecated at the end of December, 2019 (so I won't be able to update it). However, when I dig into my CloudWatch logs I'm seeing the following error:
bin/sh: curl: command not found
And when I update my Lambda function to just run which curl
I get a similar error:
bin/sh: which: command not found
Per documentation here, I know that Node 8+, Python 3.8+ and Java 11+ are using the new AWS Lambda Runtime, Amazon Linux 2.
Any help is appreciated.