Skip to content

5.30.0 runtime for amazon linux 2 lambda

Latest
Compare
Choose a tag to compare

Runtime package that can run on Amazon Lambda function with Amazon Linux 2 instance. The package is intended for NodeJS 10.x on Lambda where you can call 'child_process' to execute perl script with the perl runtime.

const child = require('child_process');

const perl5lib = `PERL5LIB=${__dirname}/lib/perl5:${__dirname}/lib/perl5/site_perl`;
const perl = `${__dirname}/bin/perl`;

child.exec(`${perl5lib} ${perl} your_script.pl`, (e, stdout, stderr) => {
  if (e || stderr) {
    throw new Error('error running ');
  }

  // do something with the output
  console.log(stdout);
});