Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I specify Node.js command line options in AWS Lambda?

I'm using AWS SAM and running against Node 10.x.

Would love to pass in the flags for experimental modules and top level await.

Thanks!

like image 991
Sean Lindo Avatar asked Jun 28 '19 17:06

Sean Lindo


People also ask

Does AWS Lambda support node JS?

You can now develop AWS Lambda functions using the Node. js 16 runtime. This version is in active LTS status and considered ready for general use.

Why node js is preferred for Lambda functions?

js is able to respond to many different requests at the same time. One thing that is interesting about Lambda Functions is that a particular Node. js instance will only ever handle a single request at a time! This means that if we do a lot of work outside of our Node.

What kind of packages can you use with node js for Lambda?

You use a deployment package to deploy your function code to Lambda. Lambda supports two types of deployment packages: container images and . zip file archives. To create the deployment package for a .


1 Answers

You can add Node.js command line options to lambda by setting the NODE_OPTIONS environment variable.

https://nodejs.org/api/cli.html#cli_node_options_options

like image 198
TheRicmo Avatar answered Oct 05 '22 21:10

TheRicmo