Ask Netlify
Our chatbot assistant can quickly answer your questions.

Functions overview

Serverless functions open a world of possibilities for running on-demand, server-side code without having to run a dedicated server. However, managing service discovery, configuring API gateways, and coordinating deployments between your app and your functions can quickly become overwhelming.

With Netlify Functions, your serverless functions are version-controlled, built, and deployed along with the rest of your Netlify site, and we will automatically handle service discovery through our built-in API gateway. This eliminates overhead and brings the power of Deploy Previews and rollbacks to your functions.

To provide faster customer experiences, synchronous functions can use response streaming to get content in front of people as quickly as possible.

For longer-running function tasks, Background Functions allow for extended execution time using asynchronous invocation.

Currently, you can deploy functions built with TypeScript, JavaScript, and Go.

# Manage your functions

Functions deployed from Netlify are immutable. This means that an update to a function on your production branch won’t change the version that was deployed in a branch deploy, or in a Deploy Preview. You can access all versions of your functions in the Netlify web interface, under the Functions tab.

By default, the list displays all of the functions, including background functions, in the current published deploy. To find functions on another deploy, you can use the search field at the top of the list. You can start typing to jump to a particular branch, or find a Deploy Preview by number.

# Default deployment options

By default, all functions are deployed with:

  • us-east-1 AWS Lambda region
  • 1024 MB of memory
  • 10 second execution limit for synchronous functions, including scheduled functions
  • 15 minute execution limit for background functions
  • 6 MB request and response payload size limit for buffered synchronous functions
  • 20 MB response payload size limit for streamed synchronous functions
  • 256 KB request and response payload size limit for background functions

# Custom deployment options

Depending on your plan, you can contact support to change the custom deployment options for synchronous functions. These deployment options include increasing the maximum execution limit and changing the AWS region. Synchronous functions can have a maximum execution limit of 26 seconds.

Netlify supports the following AWS regions:

  • ap-northeast-1 - Asia Pacific (Tokyo)
  • ap-southeast-1 - Asia Pacific (Singapore)
  • ap-southeast-2 - Asia Pacific (Sydney)
  • ca-central-1 - Canada (Central)
  • eu-central-1 - EU (Frankfurt)
  • eu-north-1 - EU (Stockholm)
  • eu-west-1 - EU (Ireland)
  • eu-west-2 - EU (London)
  • eu-west-3 - EU (Paris)
  • eu-south-1 - EU (Milan)
  • sa-east-1 - South America (São Paulo)
  • us-east-2 - US East (Ohio)
  • us-east-1 - US East (N. Virginia)
  • us-west-1 - US West (N. California)
  • us-west-2 - US West (Oregon)

Limits other than the ones mentioned above cannot be changed.

If you wish to deploy functions onto your own AWS account (in order to integrate with other AWS services on your account), please contact sales.

# More Functions resources

Optional configuration for functions: Directory

Optional configuration for functions: Directory

Optional configuration for functions: Node.js version for runtime

Create functions: JavaScript

Create functions: JavaScript

Create functions: JavaScript synchronous function format

Create functions: Test locally

Create functions: Test locally

Create functions: Test locally

Create functions: Go

Create functions: Go synchronous function format

Create functions: Access the ClientContext

Create functions: Go

Event-triggered functions

Event function payloads

Event functions signature

Identity and Functions

Functions: Identity and clientContext

Identity event functions

Function logs

Functions: Usage and Billing

Functions: Changing levels

Deploy functions

Deploy functions