Skip to Content

Functions

You can configure Vercel functions in many ways, including the runtime, region, maximum duration, and memory.


Configuring Functions

With Vercel, you can configure the runtime of a function in any of the following ways:

Configuring Functions

With different configurations, particularly the runtime configuration, there are a number of trade-offs and limits that you should be aware of. For more information, see the runtimes comparison.

Copy page

The runtime you select for your function determines the infrastructure, APIs, and other abilities of your function.

  • Node.js: When working with a TypeScript or JavaScript function, you can use the Node.js runtime by setting a config option within the function. For more information, see the runtimes.
  • Ruby, Python, Go: These have similar functionality and limitations as Node.js functions. The configuration for these runtimes gets based on the file extension.
  • Community runtimes: You can specify any other runtime, by using the functions property in your vercel.json file.

See choosing a runtime for more information.

Region

Your function should execute in a location close to your data source. This minimizes latency, or delay, thereby enhancing your app's performance. How you configure your function's region, depends on the runtime used.

See configuring a function's region for more information.

Maximum duration

The maximum duration for your function defines how long a function can run for, allowing for more predictable billing.


Memory

Last updated July 1, 2026

See configuring a function's duration for more information.

Vercel Functions have a default duration that's dependent on your plan, but you can configure this as needed, up to your plan's limit.

Cross-link map: Configuring Functions (/docs/functions/configuring-functions)From the Vercel docs graph (built 2026-09-21T05:26:59.511Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as JSON: https://vercel.com/docs/graph.jsonSemantically closest pagesConfiguring the Runtime for Vercel Functions — Learn how to configure the runtime for Vercel Functions.Runtimes — Runtimes transform your source code into Functions, which are served by our CDN. Learn about the official runtimes suppoConfiguring regions for Vercel Functions — Learn how to configure regions for Vercel Functions.Configuring Memory and CPU for Vercel Functions — Learn how to set the memory / CPU of a Vercel Function.Vercel Functions — Build API routes, webhooks, and agent request handlers with Vercel Functions, then test and debug them with Vercel CLI.This page links to (6)Configuring Maximum Duration for Vercel Functions — Learn how to set the maximum duration of a Vercel Function.Configuring Memory and CPU for Vercel Functions — Learn how to set the memory / CPU of a Vercel Function.Configuring regions for Vercel Functions — Learn how to configure regions for Vercel Functions.Vercel Functions Limits — Learn about the limits and restrictions of using Vercel Functions.Runtimes — Runtimes transform your source code into Functions, which are served by our CDN. Learn about the official runtimes suppoStatic Configuration with vercel.json — Learn how to use vercel.json to configure and override the default behavior of Vercel from within your project.Pages that link here (7)By site: vercel-docs (7)Fluid compute — Learn about fluid compute, an execution model for Vercel Functions that provides a more flexible and efficient way to ruVercel Functions — Build API routes, webhooks, and agent request handlers with Vercel Functions, then test and debug them with Vercel CLI.Advanced Configuration — Learn how to add utility files to the /api directory, and bundle Vercel Functions.Debugging slow Vercel Functions — Diagnose and fix slow Vercel Functions using CLI tools, logs, and timing analysis.Functions API Reference — Learn about available APIs when working with Vercel Functions.Getting started with Vercel Functions — Build your first Vercel Function in a few steps.Project settings — Use the project settings, to configure custom domains, environment variables, Git, integrations, deployment protection,

Vercel Functions use an infrastructure that allows you to adjust the memory size.

See configuring a function's memory for more information.

Was this helpful?