Next.js Preview Mode is now fully supported on Netlify. Learn more

Netlify Functions

Serverless functions built into every Netlify account. No setup, servers, or ops required.

Power your site without managing servers

Meet the modern backend. Infinitely scalable. Genuinely simple.

Serverless made painless

Run Lambda functions without touching AWS.

Setting up AWS Lambda functions on your own can be fairly complex. Tutorials average 20 steps! With Netlify, simply write your Lambda functions with JavaScript or Go and drop them into your functions folder. Everything else is automatic.

Functions that work as APIs

Your functions become endpoints, automatically.

Netlify deploys the functions you write as full API endpoints and will even run them automatically in response to events, like a form submission or a user login. Functions receive request context or event data, and return data back to your frontend.

Learn more in the docs

/functions/split-test-activated.js exports . handler = async ( event , context ) => { return { statusCode : 200 , body : “ We are now split testing! }; }

Run functions in the background

Use Background Functions to get work done behind-the-scenes.

Most functions return a response immediately, but what if your task needs more time to process? Background Functions allow you to extend your execution time for up to 15 minutes without impacting your user’s experience.

Learn more in the docs

Full-stack has never been easier

Netlify’s serverless functions can respond to events, sanitize user input, or know who’s logged in.

Automated triggers

Automatically trigger any function to run when a new deploy succeeds, a user authenticates, or a new form submission arrives.

See all available events

Third-party APIs

Set up functions to check and sanitize user data before sending on to third-party APIs. Or use functions to process API responses and combine API services in new and exciting ways.

Check out an example

User authentication

Instead of managing sessions on a server, use JavaScript Web Tokens to handle identity right in the browser, passing session tokens directly to your serverless functions.

Learn more about Identity

Less setup, more productivity

Functions as a Service (FaaS) providers like AWS handle some of the infrastructure hassle; Netlify takes the final step to bring functions directly to your workflow.

Running a server
You maintain everything
Cloud FaaS
Using AWS or Google
Netlify Functions
Netlify as your backend
Managed infrastructure
Automatic scaling
Code deployment
Versioning

Decoupled but not divided

Frontend code & backend code in one powerful workflow.

Develop modularly. Deploy collectively

Atomically deploy your sites and apps, pushing frontend code and backend functions together, as a unit, without even requiring a maintenance window.

Learn more about Deployment

Stage, preview, and rollback

Netlify Functions share all of Netlify’s beloved workflow features. Preview every commit with Deploy Preview links. Rollback when needed by simply clicking a prior deployment.

Learn more about Deploy Previews

Run A/B testing and phased rollouts Beta

Deploy and test multiple branches, and even control which users see which version. Plan full experiments and rolling upgrades that include both front and backend code changes. A/B test not just a button color, but an entire user workflow.

Learn more about Split Testing

Pricing for Netlify Functions

Netlify Functions are free to try and available as soon as you activate your account. Pricing scales as your usage grows—from small projects to fully customized enterprise plans.

Deploy a scalable backend with Netlify Functions in minutes.