Nodejs version 15.2.0 Custom node runtime for AWS Lambda. 100% compatible with AWS's runtime, with some additional features:
- Create new function with option : Provide Custom Runtime on AMAZON LINUX 2
- Attach the give layer or create your own from above Repo.
AWS Layer Version ARN:aws:lambda:us-east-1:741365237744:layer:runtime-nodejs15-2-0:1
- Create index.js file in the lambda code.
const { exec } = require('child_process');
exports.handler = function (event, context) {
exec('node -v', (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
console.log(`stdout: ${stdout}`);
console.error(`stderr: ${stderr}`);
});
};
- To use a handler, use the full path as a handler.
Update handler in lambda configuration as: index.handler from hello.handler