AWS Builder Center
Which AWS Lambda Type Should You Pick in 2026?

Which AWS Lambda Type Should You Pick in 2026?

Lambda now comes in five flavors. Learn what Event, Web, Durable, Managed Instances and MicroVMs are, and which one fits your app.

DevOps Engineer
Use a classic (Event) function for small jobs triggered by AWS services, a Web Function when you already have a Node.js web server, a Durable function for multi-step workflows that wait, Managed Instances for steady heavy traffic, and a MicroVM to run untrusted or AI-generated code safely.

The 30-second answer

  • Reacting to an event (a file upload, a queue message, a schedule)? Use a classic Event function.
  • Running a web app or API built with Express, Fastify, Hono or Next.js? Try a Web Function.
  • A workflow with several steps that may wait for hours or days (approvals, payments)? Use a Durable function.
  • Steady, high traffic where you want EC2 pricing options? Look at Managed Instances.
  • Running code you do not trust, such as code written by users or by an AI? Use a MicroVM.
If you are new to Lambda, start with an Event function. It is the simplest and cheapest way to learn.

Why Lambda has more than one type now

For years, Lambda meant one thing: you write a handler, and Lambda calls it when an event arrives. In 2026 AWS added more ways to run code. AWS describes three form factors: Event functions, Web Functions and MicroVMs. Two more options, Durable functions and Managed Instances, build on regular functions. That gives you five choices, and picking the wrong one makes your app harder to build or more expensive to run.

The five types side by side


Event function
Web Function
Durable function
Managed Instances
MicroVM
Best for
Small jobs triggered by events
Web apps and APIs
Multi-step workflows that wait
Steady, predictable traffic
Untrusted or AI-generated code
How you write it
A handler function
A normal HTTP server
Steps and waits in your code
A normal Lambda function
A container image from a Dockerfile
Requests per environment
One at a time
Many at once (up to 128)
Same as a regular function
Several at once
One MicroVM per user or task
What you pay for
Requests and run time
Requests, CPU time actually used, and memory
Lambda charges, with no compute charge while paused
EC2 instances, a 15% fee and a per-request charge
Compute while running
Scales to zero when idle
Yes
Yes
Yes
No, instances keep running
Suspends when idle

1. Event functions (the classic)

You write a handler, and Lambda runs it when something happens: a file lands in S3, a message arrives in SQS, an API Gateway request comes in, or a schedule fires. Each execution environment handles one request at a time. A single invocation can run for up to 15 minutes.
Pick this when you are learning Lambda, or your job is small, short and triggered by another AWS service.

2. Web Functions (new in October 2026)

A Web Function lets you run a normal HTTP server on Lambda. You do not rewrite it into a handler. AWS says it works with any Node.js server that listens on a port, such as Express, Hono, Fastify or Next.js. At launch it uses Node.js 24 on Arm64 and is available in five Regions: N. Virginia, Ohio, Oregon, Tokyo and Ireland.
Three details matter for beginners:
  • One environment serves many requests at once, up to 128. That is different from classic Lambda.
  • You are billed for the CPU time you actually use, so time spent waiting for a database or an API costs little. Memory is billed for as long as the environment exists.
  • Deploying is one command. AWS says  aws lambda-web deploy  creates the function and gives you an HTTPS endpoint in under a minute. You can split traffic between versions, for example 90% to 10%, for safe rollouts.
Pick this when you already have a Node.js web app or API, or you mostly wait on other services, such as a database or an AI model.
Watch out: because many requests share one running server, never keep one user's data in a global variable.

3. Durable functions

A Durable function is a Lambda function that can run a multi-step process and remember where it is. Your code is split into steps, and Lambda saves progress after each one. It can then pause for up to a year without charging for compute while it waits. This suits approvals, payments, AI agent workflows and anything that waits for a person or another system.
Pick this when your process has several steps and long waits.
Watch out: Lambda may run your code again from the start to restore state, so the code must be safe to repeat. Do not send the same email twice or charge the same card twice.

4. Managed Instances

Managed Instances run your Lambda functions on EC2 instances in your own account. AWS still handles patching, routing, load balancing and scaling. You pay the EC2 instance price plus a 15% management fee and a per-request charge, with no charge for run time. You can use EC2 discounts such as Savings Plans.
Pick this when your traffic is high and steady, so paying for run time per request costs more than running instances all day.
Watch out: instances keep running even when there is no traffic, so it is a poor fit for small or occasional workloads. GPU instances are not supported.

5. MicroVMs

A MicroVM gives each user or task its own isolated compute environment, built on Firecracker, the same technology behind Lambda. You build an image from a Dockerfile, and each MicroVM gets its own HTTPS URL. It can suspend and resume, and keep its state for up to 8 hours.
Pick this when you run code you cannot trust: a coding assistant, an online code editor, or a tool that runs code written by an AI.

Which one for which app? Real scenarios

Your application
Choose
Why
Resize every image uploaded to S3
Event function
Small job triggered by an AWS event
Run a nightly cleanup on a schedule
Event function
Short job with an EventBridge schedule
A personal blog backend built with Express
Web Function
You keep your normal server code
A REST API that mostly waits on a database
Web Function
You pay for CPU actually used, not time spent waiting
An order flow with payment, then a manager approval, then shipping
Durable function
Several steps, with waits that can last days
An AI agent that waits for a human to approve each action
Durable function
Pauses without paying for compute
A busy API with constant, predictable traffic all day
Managed Instances
EC2 pricing can be cheaper at steady volume
A website where users run their own code snippets
MicroVM
Each user gets an isolated machine
If two answers fit, take the simpler one. Most beginner projects need only an Event function or a Web Function.

Common mistakes

  • Using a Web Function for a tiny event job. If a file upload triggers one small action, a classic Event function is simpler.
  • Storing user data in global variables on a Web Function. One environment serves many requests at once, so data can leak between users.
  • Writing a Durable function that is not safe to repeat. Make sure running a step twice does not charge or notify twice.
  • Choosing Managed Instances for a low-traffic app. The instances run all the time, so you pay even when nobody visits.
  • Forgetting that features are new. Web Functions launched with Node.js 24 on Arm64 in five Regions. Check that your language and Region are supported before you build.
  • Not cleaning up. Delete test functions and endpoints when you finish a lab.

Try it yourself: a 10-minute Web Function

  1. Install the latest AWS CLI and sign in to a test account. Check the AWS documentation for the current command syntax, because this feature is new.
  1. Run the deploy command with the sample option (the AWS announcement mentions  --hello-world  for a sample function).
  1. Open the HTTPS endpoint that the command prints. You should see the sample page.
  1. Replace the sample with a tiny Express app that returns "Hello from Lambda", and deploy it again with the same command. Lambda publishes a new revision.
  1. Clean up: delete the function and its endpoint in the Lambda console when you finish.

More from me

Have feedback or a topic request? Leave a comment, I read every one.

Sources

Facts checked against the pages above on Oct 28, 2026. Features, Regions and prices change often, so check the current AWS documentation before you build.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article