AWS Lambda in 2026: Choosing Compute, Execution Mode and Workflow

The short answer

  • Start with an Event Function on the default compute, invoked async or by a queue, with events between functions. That still covers a lot of event work.
  • For a multi-step flow that lives in your code and has to wait, look at durable functions. For a flow that crosses many AWS services, or that people outside engineering must read, look at Step Functions Standard. For a short, high-volume multi-step flow, Step Functions Express.
  • For an HTTP API, an Event Function behind API Gateway is still the proven path; Web Functions fits a Node.js app built on a web framework. MicroVMs are for sessions that run code you do not trust. Managed Instances is for steady, heavy traffic.
  • In our simulated example, durable functions cost $121 to $224 a month against $323 to $348 for Step Functions Standard.
  • The trap to remember: a durable function behind an SQS trigger, or behind any synchronous call, must finish in 15 minutes. Put a small starter function in between.

A year ago, "run it on Lambda" meant one thing. You wrote a handler, Lambda called it with an event, and the work had to finish in 15 minutes. If it did not fit, you moved it to containers or split it with Step Functions.

That picture is out of date. The Lambda developer guide now opens with "Lambda provides three compute primitives": Event Functions (the new name for the original function), Web Functions, which run a normal HTTP server, and MicroVMs, which give each session its own virtual machine. We listed this year's changes in AWS Lambda in 2026: The Changes You Cannot Miss. This post is the follow-up, and it tries to answer the question that list leaves open: with this many options, how do you choose, and which limit catches you first?

It helps to know where we stand before you read our view. At INNOMIZE we run standard Lambda functions in production, and we have used Step Functions in the past for different use cases. Durable functions are the next option we will evaluate. We have not used Managed Instances, MicroVMs or Web Functions, so for those three the facts here come from AWS documentation and pricing pages, not from our own workloads.

All the options at a glance

The two tables below put the seven options side by side. The first is about limits and cost, the second about fit and risk. Prices are for US East (N. Virginia), from the Lambda pricing page and the Step Functions pricing page, checked on 2 and 3 November 2026. Prices change, so check them again before you plan around them.

Limits and cost

OptionLayerMax runYou pay forRequests per environmentScales to zeroLanguages
Event Functions, defaultCompute15 min$0.20 per million requests, $0.0000166667 per GB-second (x86)OneYesAWS runtimes or a custom runtime
Event Functions on Managed InstancesCompute15 min sync, 90 min async and event source mappingEC2 price plus a 15% fee, plus requestsManyNot on its own; scheduled scaling canPython, Java, Node.js, .NET
Web FunctionsCompute15 min per request (default 30 s)$0.30 per million requests, active vCPU-seconds, GB-seconds of memory consumedMany (default 64, up to 128)YesNode.js 24 only
MicroVMsCompute8 h totalBaseline rate while running, burst above it, image storage and snapshot feesMany connections per VMSuspends when idle; you terminate itAny, from your own image
Durable functionsWorkflow, in code1 year async; 15 min for sync and event source mappingLambda compute, $8 per million operations, data written and keptSame as the host functionYes; waits cost no computeJS/TS, Python, Java, Go, C#
Step Functions StandardWorkflow, state machine1 year$25 per million state transitionsn/aYes; you pay per transitionAmazon States Language; tasks in any runtime
Step Functions ExpressWorkflow, state machine5 min$1.00 per million requests, plus GB-secondsn/aYesAmazon States Language; tasks in any runtime

Fit and risk

OptionState between callsAvailable sinceLock-in (our reading)Best forAvoid if
Event Functions, defaultNone guaranteed; warm reuse onlyThe original LambdaHandler shape is Lambda-specificEvent processing, bursty trafficA caller must wait more than 15 min
Managed InstancesNone guaranteedre:Invent 2025Same as Event Functions, plus EC2 capacity in your accountSteady, predictable high-volume workTraffic is bursty or low, or the code is not safe under concurrency
Web FunctionsNone guaranteed; warm reuse only12 October 2026, 5 RegionsLow: a standard Node.js HTTP serverHTTP apps and APIs on Node.jsYou need another language, or requests are CPU-heavy and block others in the same environment
MicroVMsMemory and disk kept on suspend22 June 2026, 14 RegionsApp is a Dockerfile image; the lifecycle API is AWS-onlyUntrusted or AI-generated code, per-user sessionsThe work is a trusted batch job; containers cost less for that
Durable functionsA checkpoint per stepre:Invent 2025Workflow code is tied to the AWS durable SDKMulti-step flows in code that wait for daysThe flow mostly calls other AWS services, or your deploys are not versioned yet
Step Functions StandardKept per state, visual historyLong establishedAmazon States Language is AWS-onlyFlows across many AWS services, flows non-engineers must read, large fan-outShort, high-volume flows, or polling loops
Step Functions ExpressNot kept between states; logs only in CloudWatchLong establishedSame as StandardShort, high-volume, multi-step flowsThe flow waits on a person or another job, or runs longer than 5 min

The rest of the post explains the reasoning behind these rows, layer by layer.

Three layers, one choice in each

When people list "ways to run work on Lambda", the list usually mixes things that sit at different levels. A single function can be an Event Function, be triggered by an SQS queue, and also be a durable function. Those are three separate decisions, and treating them as one item in a list hides the trade-offs between them.

We find it easier to think in three layers and make one choice in each. The grouping is ours, and only the first layer uses AWS's own words.

  1. Compute is what runs and on what: a handler, an HTTP server or a VM, and the capacity under it.
  2. Execution mode is how one invocation behaves: who waits for the result, how long it can run, and who shares the environment.
  3. Workflow is how several steps hang together: in your code, in a state machine, or through events between functions.

Three layers, one choice in each

Layer 1: compute

Pick the primitive by the shape of the work

Event Functions are the Lambda most teams already know. Lambda calls your handler with an event, one execution environment serves one request at a time, and the function scales with traffic and down to zero when there is none. This is what we run in production, and for event-shaped work it is still the simplest choice.

Web Functions, launched on 12 October, run your HTTP server (Express, Hono, React Router) directly, with no adapter in front of it. The main difference from Event Functions is concurrency: one environment serves many requests at the same time, and the pricing follows from that. The pricing page says each environment "is billed for the memory it consumes, for as long as it runs, including time between requests". AWS's own example is a server-side rendered app with 15 million requests a month on one environment that uses about 0.49 GB, which comes to $25.78 a month.

The request price is 50% higher than for Event Functions, so the saving has to come from sharing one environment across many requests that spend most of their time waiting on I/O. How many requests one environment really serves is the number that decides the cost, and it is not fixed. The Web Functions scaling docs describe a cap of 64 by default, with the real value adapting under load, and AWS recommends load testing more than once. Until you measure it on your own endpoint, any cost model for Web Functions is an estimate, and that includes our own early one.

MicroVMs are a separate resource with their own API, and they do not behave like functions. Each session gets its own Firecracker VM that can run for up to 8 hours in total, according to the launch post. A MicroVM can suspend when it is idle, keep its memory and disk, and resume when traffic comes back. The MicroVMs guide positions it for code you do not fully trust, such as development environments, AI code sandboxes and multi-tenant CI/CD. On cost, besides the running rate, the pricing page charges $0.08 per GB-month for image storage and a small fee per GB each time a snapshot is written on suspend or read on resume, so a session that suspends often pays for that too.

Three compute primitives, three shapes of work

If you want a short rule for this layer, look at the shape of the work first. An event to process, such as a queue message, a file upload or a schedule, is an Event Function. An HTTP app or API that you want to run as a normal web server is a Web Function. A session that runs code you do not trust, or that must keep its state while idle, is a MicroVM.

For Event Functions, pick the compute type

Event Functions can run on two compute types, and the choice is mostly about traffic shape and cost.

The default is the shared Lambda fleet. It scales per invocation, has cold starts, and scales to zero, which makes it a good fit for bursty or unpredictable traffic.

Lambda Managed Instances runs your functions on EC2 instances in your account instead. One environment serves many invocations at once, so thread safety and shared state in your code become your problem. It starts three instances by default and does not scale to zero on its own. You pay the EC2 price plus a 15% management fee, and in return you get up to 32 GB of memory and 16 vCPU per function. Since September, async and event source mapping invocations can run for up to 90 minutes, except from Amazon MQ and DocumentDB, while sync invocations stay at 15.

Our Managed Instances decision guide goes through when it beats standard Lambda, ECS or EKS. For our own work the answer is simple for now: we have no use case for it yet, so the 90-minute limit does not help us today.

Some work fits none of these options. A trusted batch job that runs for hours, now and then, is still a container job. We described that pattern with ECS Fargate in Long-running Serverless Web Scraping, and it still holds.

Layer 2: execution mode

In most cases you do not pick the execution mode directly. The trigger picks it for you: an API call is synchronous, an S3 event is asynchronous, and an SQS queue goes through an event source mapping. What you do choose is which trigger to use, and that choice decides how long the work can run and what happens on failure.

ModeWhat it doesRun limit for Event Functions
SynchronousThe caller waits for the result15 min, on both compute types
AsynchronousLambda queues the event and retries on failure15 min, or 90 min on Managed Instances
Event source mappingLambda polls SQS, Kinesis, Kafka and other sources, then calls the function synchronously15 min, or 90 min on Managed Instances except Amazon MQ and DocumentDB
Response streamingThe function sends its response in partsSame as the invoke type
Tenant isolationThe caller passes a tenant ID, and environments of one tenant never serve anotherSame as the invoke type

The mode also limits what a durable function can do, which we come back to in the queue trap below.

Tenant isolation mode, available since November 2025, is useful when one function serves many customers and each customer must get its own environment. It costs $0.000167 for each new tenant environment at 1024 MB in the pricing page example, on top of normal compute. The detail that is easy to miss is that it does not work directly with event source mappings. The AWS Compute Blog shows the pattern for SQS and EventBridge: a small routing function reads each message and calls Invoke with the tenant ID. So a queue-driven multi-tenant design needs one more function than you might expect.

How long each option can run

Layer 3: workflow

When the work has more than one step, you also choose how the steps hang together: in your code with durable functions, in a Step Functions state machine, or through events between functions. You can also mix them. AWS describes a hybrid on its durable functions or Step Functions page, with durable functions for the application logic and Step Functions for the flow across services, and suggests starting with durable functions and adding Step Functions when you need to orchestrate many services.

We compared durable functions and Step Functions in December 2025 in AWS Lambda's Biggest Update in Years. That post has our "choose durable functions when" and "choose Step Functions when" lists, and we still agree with them. What follows is what has changed since then, and the limits we will check in our own evaluation.

Durable functions: the workflow is your code

A durable function is a normal Lambda function with checkpoints. Each step saves its result. When the function waits, or fails, it stops. When it resumes, it replays from the top and skips every step that already has a saved result, so the code reads like a normal sequential program even though the run can last for days. SDKs now cover JavaScript and TypeScript, Python, Java, Go and C#, and the Go SDK reached general availability in October, according to the AWS Weekly Roundup of 19 October.

The price is rarely the hard part. The replay model is, because it puts new rules on your code and your deploys. Steps run at least once by default, so a step that calls a payment API needs an idempotency key. Code outside steps must give the same result on replay, so random values, the current time and side effects belong inside a step; Yan Cui's five gotchas shows how each of these goes wrong. Deploys matter just as much. You invoke a version or an alias, because an execution started on $LATEST is allowed but resumes on whatever code is deployed next. The best practices page also says not to rename steps or change their behaviour while executions are in flight. I think this is the main point for a team on standard Lambda today: a deploy process with versions and aliases has to come before durable functions, not after.

A few hard limits also shape the design:

  • Durable execution can only be turned on when you create the function. To move an existing function, you create a new one.
  • One execution can have up to 30,000 operations and 100 MB of data written, and one operation can carry up to 1 MB. These quotas cannot be raised.
  • Only an async invocation gets the full year. A synchronous call caps the whole execution at 15 minutes.
  • Lambda does not retry a failed durable execution automatically, and Lambda destinations are not supported. Use a dead-letter queue and alarms instead.

Step Functions: the workflow is a state machine

Step Functions defines the flow in Amazon States Language or in the visual designer, outside your code. There are two workflow types, and the difference between them matters as much as the difference from durable functions.

Standard workflows run for up to a year with exactly-once execution, unless you add retries yourself. You pay per state transition, and retries count as transitions. Standard is the type that keeps a visual history of each run, lets you redrive from the failed step, and supports Distributed Map, which runs up to 10,000 child executions in parallel.

Express workflows run for up to five minutes and are billed by requests and duration. Async Express is at-least-once, so its steps must be idempotent. Sync Express is at-most-once and does not restart on failure. Express keeps no execution history unless you turn on CloudWatch Logs, and it does not support the .sync job pattern or callbacks with a task token, which rules it out for flows that wait on a person or another job.

Step Functions is the better choice when the flow calls many AWS services directly, because it integrates with more than 220 of them and many steps then need no Lambda at all. It also helps when people who do not read code must read or approve the flow. The cost traps are well known: a Wait, Poll and Choice loop pays for transitions every time it goes around, and Yan Cui's anti-polling pattern replaces it with a task token and an event. The payload limit is 256 KB per state, so large data goes to S3 and you pass a reference, and a Standard execution can hit its limit of 25,000 history events if it loops for a long time.

Two ways to keep a workflow's place

What each option asks of the team

Both durable functions and Step Functions tie the workflow to AWS. With durable functions, the lock-in sits in your code, through the durable SDK and its replay model. With Step Functions, it sits in the state machine definition. The skills are different too. Durable functions ask the team to learn replay rules and to keep deploys versioned, but the flow stays in the language they already use and can be tested in code with AWS's testing SDKs. Step Functions asks the team to learn Amazon States Language, and gives back a flow that anyone can read in the console.

Events between functions

The third way has no central controller at all. One function puts a message on SQS or an event on EventBridge, and the next function picks it up. It is cheap and simple, and each part scales on its own. The cost shows up later: nobody owns the whole flow, so you rebuild the run history from logs, and a retry in the middle of a flow needs careful design.

The queue trap

Here is one limit that is easy to miss in the docs, and it matters to anyone who triggers Lambda from SQS.

An event source mapping calls a durable function synchronously. That means when SQS triggers a durable function, the whole execution must finish within 15 minutes (90 on Managed Instances), and that includes any waits. If the durable execution timeout is set above that limit, creating the mapping fails. A durable function that was meant to wait a day for an approval cannot sit directly behind a queue.

AWS's fix is a small standard function between the queue and the durable function. The standard function reads the message and starts the durable function asynchronously, with an execution name so that duplicate messages start only one execution. With that in place, the durable run can last up to a year.

The queue trap, and the fix

Workflows and AI agents

Two launches this year connect agents and workflows, in opposite directions. Since 3 June, a Step Functions workflow can add an agent reasoning step through the AgentCore managed harness, which is still in preview in four Regions. Since 29 October, it also works the other way: Standard and Express workflows can be tools for an agent through AgentCore Gateway, at the standard rates of both services. In both cases the agent decides when and with what input, and the state machine keeps the fixed steps out of the prompt. For work where the order of steps must not change, such as an approval followed by a payment, that is a good reason to put a state machine next to the agent.

A simulated cost example

To see how the pricing models behave, we ran one workload through all three. This is a simulation, not our bill and not a benchmark. Its purpose is to show where the cost of each option comes from, so you can repeat the calculation with your own numbers.

The workload is 1 million executions a month. Each execution has 10 steps of 200 ms at 1 GB on arm64, and one 24-hour wait in the middle. There are no retries, and the free tier is applied once.

OptionMonthly costWhere the cost comes from
Durable functions, 1 KB per step$121.43Operations: 12M × $8 per million = $96. Compute $21.33. Data $3.90. Requests $0.20
Durable functions, 32 KB per step$224.13Operations $96. Data written $82 and kept $24.60. Compute $21.33. Requests $0.20
Step Functions Standard$323.03 to $348.03Transitions: 12M to 13M × $25 per million. Lambda $23.13
Step Functions ExpressDoes not fitThe 24-hour wait is longer than the 5-minute limit

Same workflow, three ways: where the money goes (simulated)

In this example durable functions cost about 1.4 to 2.9 times less than Step Functions Standard, mainly because one operation costs about a third of one state transition. Payload size moves the durable cost the most: at 1 KB per step, data is about 3% of the bill, and at 32 KB per step it is close to half. Step Functions Standard does not bill payload size at all, so the gap closes as payloads grow.

Two caveats apply. The durable figure is a lower bound, because each resume replays the handler from the top and that compute is billed, and we did not model replays. The Step Functions figure is a range because AWS's pricing example counts Start and End as transitions but does not say how a Wait state counts, so we show 12 and 13 transitions per run.

Our December post counted only operations and transitions. This example adds data and compute, which is why the gap is smaller than it looked then. I think the fair summary is that for a flow that stays inside Lambda and has small payloads, durable functions are cheaper. When the flow calls many AWS services, or when people outside the engineering team must read it, Step Functions earns its higher price.

To run the same calculation for your own flow, these are the inputs that move the bill:

  • Steps per run, and retries per step
  • Waits per run, and whether they sit behind a synchronous trigger
  • Payload size per step, and how many days durable data is kept (14 by default)
  • Transitions per run in Step Functions, including Start and End
  • Replay cost: how heavy your handler start-up is
  • For Web Functions, how many requests one environment really serves

Pick by the work

Five questions to one option

The flow is a starting point for new work, not a rule, and each question has a condition behind it.

  1. Is it an HTTP app or API you serve yourself? An Event Function behind API Gateway or a function URL is still the safer answer for most APIs. It works in every language and every Region, and its cost is easy to estimate. Web Functions makes sense when the app is already a Node.js server on a framework such as Express or Hono, and the adapter layer is the part that hurts. It is new, Node.js only and in five Regions, and its cost depends on how many requests one environment serves, which you only know after a load test.
  2. Does it run code you do not trust, per session? This is the case MicroVMs is built for, such as AI-generated code or per-user sandboxes. A trusted job that runs for hours is still cheaper on containers.
  3. Does it have more than one step? If not, an Event Function on the default compute is enough. Managed Instances only pays off when the traffic is steady and heavy enough to keep its instances busy.
  4. Does the flow call many AWS services, or must people outside engineering read it? This is where Step Functions Standard earns its price. Express is for short, high-volume flows whose steps are idempotent. If neither applies, the flow belongs in your code as a durable function.
  5. Is the durable function triggered by SQS, or by any synchronous call? Then the whole run is capped at 15 minutes, waits included. Add a starter function that invokes it asynchronously, as described in the queue trap above.
WorkComputeModeWorkflow
Process queue messages, under 15 minEvent Functions, defaultEvent source mappingEvents between functions
Multi-step order flow with a human approvalEvent Functions, defaultAsync, through a starter function if SQS triggers itDurable functions
Flow across S3, DynamoDB, Glue and other services, read by non-engineersEvent Functions for the custom stepsCalled by Step FunctionsStep Functions Standard
High-volume, multi-step transform, under 5 minEvent FunctionsCalled by Step FunctionsStep Functions Express, async with idempotent steps
Steady, heavy event processing, up to 90 min, not from Amazon MQ or DocumentDBEvent Functions on Managed InstancesAsync or event source mappingAny
HTTP API or web appEvent Functions behind API Gateway, or Web Functions for a Node.js app on a web frameworkHTTP requestNot needed
Per-user sandbox for untrusted or AI-generated codeMicroVMsAPI-driven sessionsYour own controller
One SaaS function serving many tenantsEvent FunctionsTenant isolation, with a routing function for queuesAny

Closing

Standard Event Functions are what we run in production, and for us they are still the right place to start. The other six options each solve a specific problem, and the tables above show which one. Durable functions are the next option we will evaluate, and the limits in this post, especially the queue trap and the deploy rules, are our checklist for it.

If a durable function has to wait a day behind an SQS queue, would you add a starter function, or move that flow to Step Functions?

Further reading

Sources not linked above, for readers who want to go deeper.

Nov 04, 2026

Similar articles

Free local AWS emulators in 2026

Free Local AWS Emulators in 2026: What Each One Runs and Where Each One Stops

LocalStack's free edition ended in March 2026, and on 11 November AWS shipped its own emulator. Where each local option runs, what it costs and where it stops.

AWS Lambda 90 minute timeout: what it changes and what it does not

Lambda's function timeout went from 15 minutes to 90 minutes on 9 September 2026, for async and event source mapping invocations on Managed Instances. Here is what that breaks in the old serverless decision rule, the five checks we now run before moving a job off containers, and the one workload we decided not to move.

Amazon S3 Files Deep Dive: File System Access to S3 Buckets, How It Works and When to Use It

AWS just made S3 buckets mountable as native NFS file systems. We break down how S3 Files works, the cost model, how it compares to Mountpoint, EFS, and FSx, and when it's the right choice.