Updated

Best serverless functions in 2026

Learn which serverless functions to use in 2026

Serverless functions run your backend code on demand, without you managing servers. They handle things like webhooks, server-side rendering, scheduled jobs, and API routes that need to keep secrets off the client.

Supabase Edge Functions

Supabase Edge Functions are server-side TypeScript functions that run on the Deno runtime and are deployed globally.

Choose Supabase Edge Functions if you:

  • Need to author, deploy, and monitor serverless functions distributed globally at the edge, close to your users.
  • Have a project that already uses Supabase and needs server-side logic with the same Row Level Security policies that protect the rest of your app.
  • Are starting a new project that also needs a Data API, Storage, Realtime, or Auth.

Vercel

Vercel Functions run Node.js, Python, and other runtimes alongside your frontend. Vercel is a common host for Next.js apps, and its functions run as part of the same deployment as your pages and Route Handlers.

Vercel is compatible with Supabase. You can connect to Supabase Postgres from Vercel functions using the serverless drivers guide, which includes a Vercel-specific setup with the Supabase pooler. The Vercel integration for Supabase also configures your connection strings as environment variables on your Vercel project.

Cloudflare Workers

Cloudflare Workers run JavaScript and WebAssembly on Cloudflare’s global network, close to your users.

Cloudflare is compatible with Supabase. See the serverless drivers guide for the Cloudflare Workers setup.

AWS Lambda

AWS Lambda runs functions in response to events from other AWS services, HTTP requests through Amazon API Gateway or Lambda function URLs, and schedules. It supports many languages and offers fine-grained control over memory, timeouts, and networking.

Lambda fits teams whose infrastructure already runs on AWS. You can connect Lambda functions to Supabase Postgres with a standard Postgres client, or call the Data API with supabase-js. Use the shared pooler in transaction mode for connections from short-lived functions, so you do not exhaust your database connections during traffic spikes.

Netlify Functions

Netlify Functions are serverless functions that deploy with your site on Netlify. They are a good fit for static sites and front-end frameworks that need a small amount of server-side logic, such as form handling or API proxies.

Netlify Functions can call Supabase through supabase-js or connect with a Postgres client. When using a Postgres client, use the shared pooler in transaction mode and configure your client for a short-lived environment.

Other providers

Any platform that can run HTTPS requests or open a Postgres connection can work with Supabase. If you use a runtime not listed here, start with the Data API for HTTP access or the connection guide for a Postgres client connection.

Which serverless function to choose

If you already use Supabase or are starting a new project, Supabase Edge Functions are the default choice. Otherwise, use this list to narrow down your options:

  • Supabase Edge Functions: Best if you Need to author, deploy, and monitor serverless functions distributed globally at the edge, your project already uses Supabase, or you are starting a new project that needs a Data API, Storage, Realtime, or Auth.
  • Vercel Functions: Best if you host a Next.js app and want its Route Handlers in the same deployment.
  • Cloudflare Workers: Best for lightweight logic that runs close to users worldwide, provided you can work within the Workers runtime.
  • AWS Lambda: Best if your infrastructure already runs on AWS and you need fine-grained control over resources.
  • Netlify Functions: Best if you host a static or front-end site on Netlify and need a little server-side logic.