Node.js Layer for AWS Lambda

Use the latest version of Node on AWS Lambda

Don't miss low-impact performance monitoring for your AWS Lambda functions – create a free NodeSource account.

Node Version
AWS Region

Install Type

These instructions assume you use the Serverless Framework to develop and deploy your Lambda functions.

  1. If you haven't already, install Serverless and watch this video to set up AWS permissions

  2. With your desired region and Node.js version chosen above, replace your project's serverless.yml with this information:

    👉 Copy and paste the above in place of your function's existing template.yml

  3. Deploy and then invoke your function:

  4. If you're interested in monitoring the performance of AWS Lambda functions and the security of installed modules and dependencies, create a free NodeSource account.

    Sign Up
  1. If you haven't already, install the AWS CLI

  2. Create a zip file of your function code, including the node_modules/ folder. Make a zip however you want, or run this in your project directory (replacing file names as needed):

  3. Create an AWS role for your function or specify an existing one

  4. Choose your desired region and Node.js version above, then replace function, file, handler method, and AWS role with your values. Then run this command in the AWS CLI:

    If you want to update an existing function to use this layer, run this command instead:

  5. Invoke your function:

  6. If you're interested in monitoring the performance of AWS Lambda functions and the security of installed modules and dependencies, create a free NodeSource account.

    Sign Up

Sign up for tips and news about Node.js in the cloud