[Support Guide] Netlify Lambda Functions 101 & Debugging

Last checked: April 2024

Functions are a huge part of what makes JAMstack sites so powerful, and now you can run dynamic code at browse time via AWS Lambdas on your Netlify site, without actually needing an AWS account. Things that you have previously needed a server-side backend to accomplish, such as processing a form submission, or managing an Identity signup, or triggering a series of events based on browse-time data can now be handled without needing to run a server on your own. Hopefully this is both much cheaper and much easier to maintain!

Lambda functions are new territory for many, and it can feel overwhelming at first to get started. This post is a work in progress, and we’ll be continuously editing it and making it more useful for you to debug your sites and apps that use Netlify Functions.

The official Netlify docs site on Functions should be your starting place - it contains tons of information to get you up and running the right way.

This incredible article describes how you can debug Netlify Functions using VSCode!

There are a few more bits and pieces:

  • Most Lambda functions timeout after 10 seconds, and are limited to 1024 MiB (1 GiB) of RAM by default. Some modules, for example, Headless Chrome, require the whole 1 GB of RAM!
  • Lambda functions are deployed by default to AWS in their us-east-1 region, though Pro and higher customers can select a region of their choosing in our UI.
  • There are custom settings available (up to 26 seconds runtime and 3 GB memory) which you’ll need to contact our Support team to get configured. Please post in the Admin area of this forum to get our attention for this.
  • Note that we do also have background functions which are designed to run asynchronously for up to 15 minutes, for those workloads that require more in-depth work or to talk to potentially very slow API’s.

Question not answered? Don’t fret - pop a comment below and we will be happy to help you out.

1 Like

Also checkout the open source netlify functions workshop

Including Core Concepts and ready to deploy serverless use cases

Also the functions examples site