[Report] I Learned How to Choose Between and Combine AWS Step Functions and AWS Lambda durable functions #AWSreInvent #API318

[Report] I Learned How to Choose Between and Combine AWS Step Functions and AWS Lambda durable functions #AWSreInvent #API318

A report on AWS re:Invent 2026 session API318. It covers differences and limits between AWS Step Functions and AWS Lambda durable functions, selection criteria, five scenarios, and patterns for combining the two.
2026.12.02

This page has been translated by machine translation. View original

Introduction

Hello everyone, this is Akaike.

I'm attending AWS re:Invent 2026, and I listened to the session "Composing the right orchestration for serverless workflows".

When building workflows on AWS, Step Functions used to be the standard choice, but since Lambda durable functions appeared, don't you feel there are more situations where it's hard to decide which one to use??

This session explained the differences between the two orchestrators, how to choose between them, and patterns for combining them, so I've summarized the content here.

Session Overview

Title

Composing the right orchestration for serverless workflows (API318)

Abstract

Both AWS Lambda durable functions and AWS Step Functions handle retries, long-running execution, and failure recovery - so how do you choose? In this session, we cut through the confusion with a clear decision framework across three scenarios: human-in-the-loop approvals, long-running AI agent workflows, and multi-service sagas. We'll also show a hybrid pattern where Durable Functions handle inner business logic while Step Functions orchestrate at the macro level - code-level flexibility inside, visual observability outside. Leave with a practical framework and a real production example to guide your next serverless workflow decision.

AWS Lambda durable functions and AWS Step Functions both support retries, long-running execution, and failure recovery, so which one should you choose? In this session, using three scenarios as examples—approval processes involving humans, long-running AI agent workflows, and multi-service sagas—we present a clear decision-making framework and clear up the confusion. We will also introduce a hybrid pattern in which durable functions handle the inner business logic while Step Functions orchestrate at the macro level. You get code-level flexibility on the inside and visual observability on the outside. Through this session, you will take away a practical framework and a real production example to help with your next serverless workflow decision.

Speaker

  • Dan Ronald (Senior Manager, Product Management, AWS)

Session Information

  • Level: 300 - Advanced
  • Session type: Lightning talk
  • Topic: Application Integration
  • Related services
    • AWS Lambda
    • AWS Step Functions

API318_01

Session Content

Do We Still Need Orchestrators in the Age of Agents?

API318_02

The session began with the following question.

In a world of agents, do I still need an orchestrator?
(In the age of agents, do we still need an orchestrator?)

Agents reason on their own, call tools, make decisions, and move work forward.
The slide showed an example of a support agent using three tools: search orders, send email, and refund.

To this, the speaker answered that in many respects orchestrators are more important than ever.

Workflows Above and Below the Agent

API318_03

As the reason, an example was presented of using workflows in two places: above and below the agent.

Above the agent: the workflow calls the agent

The agent is embedded as a single step in a flow such as "Verify customer → Load policy → Agent step → Policy check → Human approval".
By having the workflow side handle the decision of whether to accept the agent's response and the fixed procedures, the overall behavior can be made deterministic.
The speaker also gave as a reason that running fixed processing in code is the lowest-cost option.

Below the agent: make the workflow a tool

The inside of the agent's refund tool is turned into a workflow: "Check eligibility → Manager approval → Issue credit".
By extracting multi-step processing into a workflow, you can save tokens, processing becomes faster, and the behavior becomes deterministic.

Agenda

API318_04

The session was structured as follows.

  1. AWS's two orchestrators
  2. How to choose
  3. Five scenarios
  4. Combining orchestration services

The Two Orchestrators

API318_05

These are the two orchestrators covered this time.

AWS Step Functions AWS Lambda durable functions
Release December 2016 December 2025
Positioning Orchestration connecting AWS services Application orchestration performed within code

Step Functions will reach its 10th anniversary next week. 🎉
Its characteristic is that it uses a graph-based definition, so you can view the workflow as a diagram.

durable functions, on the other hand, bring orchestration capabilities into your code.
Each time a step is executed, its result is saved as a checkpoint.
Because execution runs as a collection of multiple invocations rather than a single invocation, processing can continue for up to one year, beyond the per-invocation execution time limit of a Lambda function.

Below is the durable functions sample code shown on the slide.

@durable_execution
def handler(event, context):
    order = context.step(validate(event))
    if order["in_stock"]:
        context.step(charge(order))
    else:
        context.wait(Duration.from_days(1))

The Same Guarantees and Three Differences

API318_06

The two orchestrators provide similar guarantees, but differ in the following three points.

Aspect Step Functions durable functions
Purpose Coordinate services (workflow-centric) Make application logic reliable (application-centric)
Programming model States and state transitions (flow-first) Code and durable operations (code-first)
Durability Holds state as a state machine Checkpoint and replay (saves progress and re-executes the code)

Regarding the difference in purpose, the explanation was that people who use Step Functions often have the workflow they want to build in mind from the start, such as a business process or pipeline, while durable functions are used to make distributed applications, which have many places where failures can occur, reliable.

How durable functions Replay Works

API318_07

durable functions operate with a replay approach that restores state from checkpoints.

@durable_execution
def handler(event, context):
    order = context.step(validate(event))
    context.wait(Duration.from_days(1))
    context.step(charge(order))

With this code, it works as follows.

  1. First invocation
    • Executes validate and saves the result to a checkpoint
    • Saves a checkpoint at wait, and the function stops
  2. One day later, second invocation (replay)
    • Re-executes the code from the beginning
    • validate and wait are skipped using the checkpointed results
    • charge is executed for the first time here

The key point is that the function is stopped while waiting.
The bottom of the slide also had a note saying "code between steps must be deterministic".

Comparison of Limits

API318_08

This is a comparison of the limits of the two orchestrators.
For the durable functions values, the right side of the arrow is the value after the recent increase.

Item Step Functions durable functions
Maximum execution time 1 year 1 year
Events/operations per execution 25,000 events 3,000 → 30,000
Payload per step 256 KB 256 KB → 1 MB
Concurrent executions 1 million (can be raised by requesting a quota increase) 1 million → 10 million
Starts per second 1,300 (bucket refill of 300 per second) 300 → 6,000
Transitions/operations per second 5,000 1,000 → 20,000
Count per account (item name partially cut off) 100,000 No separate limit

According to the speaker, the durable functions limits were raised by 10 to 20 times.
There was also a note that Step Functions counts its limit in events, and one state transition corresponds to roughly 5 events.

Decision Framework

API318_09

Five questions were presented as criteria for deciding which one to choose.

Question Step Functions durable functions
Where does the logic live? Spans many AWS services Mainly inside Lambda code
How does the team build it? Visual designer, ASL, CDK Familiar languages, IDEs, unit tests
Who needs to read it? Operators, auditors, business owners Developers
Is the flow of processing determined in advance? Yes (steps are fixed) No (the code or model decides the flow)
(The fifth question is cut off) No runtime to patch Runtime, SDK, and package upgrades are required

The speaker's supplementary remarks on each question are as follows.

  • Location of logic
    • Step Functions can directly call thousands of APIs across more than 220 services
    • If Lambda code is central, durable functions are a good choice
  • How the team builds it
    • Code is easier to unit test, but Step Functions also has TestState
  • Who reads it
    • Step Functions diagrams are easy to share with business stakeholders
    • durable functions are code, so they are mainly read by developers
  • Whether the flow is determined in advance
    • durable functions can handle cases where the flow isn't determined in advance
    • In Step Functions, the definition becomes more complex as branching increases
  • Operational effort
    • Step Functions workflows built ten years ago are still running today without any changes
    • durable functions are code, so updates to the runtime, SDK, and packages are required

Scenario 1: Software factory

From here, examples of which to choose were shown across five scenarios.

API318_10

The first was software development automation proceeding through "Plan → Code → Test → Scan → Approve → Deploy", and durable functions were recommended.

  • In each of the Code, Test, and Scan steps, untrusted code or AI-written code is run in an isolated sandbox (MicroVM)
  • Approve waits for human approval, but no compute is used while waiting

Also, just before re:Invent, an extension for orchestrating MicroVMs with durable functions was released.
With this, processing that previously required thousands of lines of code can now be written with just a few operations.

Scenario 2: IT automation

API318_11

The second was IT automation that processes "Check → Process → Save" triggered by an upload to S3, and the assessment was that either would work.

  • If you want to build it once and keep it running without touching it, Step Functions
  • If you already have a lot of Lambda code, durable functions

For the launch trigger, you can use EventBridge with Step Functions, and Lambda event source mapping with durable functions.
In the end, the speaker said you can choose based on preference.

Scenario 3: Business process

API318_12

The third was a business process proceeding through "Submit → Validate → Approve (waiting for human approval) → OK? → Provision → Notify", and Step Functions was recommended.

The reason is that the Step Functions execution screen looks very similar to business process tools, so it is easy for stakeholders to understand.
The speaker said many people tell them they appreciate Step Functions' visualization, and that the diagram is also helpful when operators debug.

Note that durable functions don't have a diagram, but a screen for checking the execution status of each step is provided.

Scenario 4: ETL

API318_13

The fourth was ETL, and Step Functions was recommended.

Using Step Functions' Distributed Map, you can run up to 10,000 child workflows in parallel against a large number of S3 objects.
At present, only Step Functions offers this feature, so Step Functions is suited to cases where you want to parallelize at large scale.
In fact, the speaker said many customers orchestrate Glue jobs and EMR jobs with Step Functions.

Scenario 5: Agent orchestration

API318_14

The fifth was agent orchestration, and the assessment was that either would work.

Distributing processing across multiple agents

This is a configuration that splits one task across multiple agents and merges the results.

  • With Step Functions, use a Parallel state
  • With durable functions, use context.parallel()

Making the agent loop durable

With durable functions, each model or tool call within the agent loop can become a saved step.
The slide showed code running Pydantic AI on durable functions.

agent = Agent("bedrock:us.amazon.nova-pro-v1:0",
    capabilities=[AWSLambdaDurability()])

@durable_execution
@durable_agent_handler
async def handler(event, context):
    result = await agent.run(event["prompt"])
    return result.output

Even if a problem occurs midway, saved model calls and tool calls are not redone, so processing can resume without wasting tokens.

There was also a mention that because Lambda is event-driven, it is well suited to background agents that launch a durable function triggered by an event.

Calling a durable function from Step Functions

API318_15

From here, we look at patterns for combining the two.

In the middle of a Step Functions workflow (Receive → Notify), a durable function (Validate → Call model → Wait for a person → Charge) is called.
Where to divide steps within the durable function is decided in code.

Step Functions has two modes, Standard and Express, and Express runs in memory so it can only run for up to 5 minutes.
The explanation was that if you make the child process a durable function instead of an Express workflow, the 5-minute limit goes away and it can resume even if it fails midway.

Calling durable functions from Distributed Map

API318_16

The other pattern is calling a durable function for each item from Step Functions' Distributed Map.
You can combine the scale of Distributed Map, with up to 10,000 parallel executions, with the durability of durable functions.

Overall Summary

API318_17

At the end of the session, three points were summarized.

  1. Same guarantees, enterprise scale
    • Lambda durable functions and Step Functions provide similar durability guarantees and operate at similar scale
  2. Pick based on your use case and desired DX
    • If you develop in a general-purpose programming language and orchestrate logic within an application built on Lambda, use Lambda durable functions
    • If you orchestrate across services, or value the development experience of building with graphs and the operational screens, use Step Functions
  3. Better together
    • Combine Step Functions, durable functions, and agents to realize the intended use case

Closing

That was my report on the session "Composing the right orchestration for serverless workflows".
It covered not only how to choose between the two orchestrators but also patterns for combining them, and it was helpful for organizing my thinking on when to use which.

Personally, the following points were especially impressive.

  • The idea of using workflows above and below the agent
    • Having both a direction of making the agent's decision a single step in a workflow and a direction of making the inside of a tool a workflow seems useful for organizing my thinking when designing
  • "Who reads it" and "operational effort" being included in the decision framework
    • I thought, "I see!" at the framing that not only feature differences but also whether business stakeholders can check it in a diagram and whether you can avoid updating the runtime can be reasons to choose one
  • The significant increase in durable functions limits
    • Starts per second and operations per second now exceed those of Step Functions, so it looks like a viable option even for large-scale processing

When designing workflows in the future, I plan to use the five questions in the decision framework to consider which to use, or whether to combine them.


AWS re:Invent 2026まとめ情報

クラスメソッドは2026/11/30〜12/4にラスベガスで開催されるAWSカンファレンスイベント「re:Invent」を今年も特集しました。ぜひ一度ご覧ください。 re:Invent 2026ポータルサイトを見るAWS re:Invent公式サイトはこちら

Share this article

AWSのお困り事はクラスメソッドへ