Search code examples
node.jsamazon-web-servicesaws-lambdaserverlessserverless-framework

How to enable experimental features of nodejs in serverless framework or AWS lamda


I am using Serverless-Framework for my nodejs application, but application requires the experimental features of nodejs to be enabled, how can I do this in serverless using sls deploy cmd. or direct on AWS lambda


Solution

  • If the feature is behind a flag, you can set the NODE_OPTIONS env var, which lambda supports.

    If the feature is not on the AWS-provided node runtimes (as of late 2021 v14.x is the highest version), you can deploy a custom runtime or a Docker container.