Skip to main content
Some processes take days, weeks, or even months. Durable Workflows let you write these as simple code that can pause, wait, and resume—even if servers restart.

What Are Durable Workflows?

Normal serverless functions timeout after 15 minutes. Durable Workflows can:
  • Pause for minutes, days, or up to 1 year
  • Wait for external events (webhook, user action)
  • Resume exactly where they left off
  • Retry failed steps automatically

When to Use Durable Workflows

Most applications don’t need Durable Workflows. Simple event handlers and scheduled jobs cover 90% of use cases.
Use Durable Workflows only when you explicitly need:
  • Human approval waits - Processes that pause for days or weeks waiting for someone to approve
  • Long-running processes - Workflows that must survive beyond Lambda’s 15-minute timeout
  • Saga patterns - Multi-step transactions with compensation logic if steps fail
  • “Human in the loop” - Processes that require human intervention mid-workflow
Don’t use Durable Workflows for:
  • Simple event handlers (use Events instead)
  • Scheduled jobs (use Jobs instead)
  • Basic CRUD operations
  • Workflows that complete quickly

Use Cases

Approval Flows

Wait for manager approval before processing expense reports.

Payment Retries

Retry failed payments with exponential backoff over days.

Onboarding

Multi-step user onboarding over days or weeks.

Subscription Lifecycle

Handle trials, renewals, and cancellations over months.

Defining Workflows

Describe the workflow in natural language:

How It Works

The magic: This code pauses at each await and resumes later—even if the server restarts, deploys happen, or days pass.

Waiting for Events

Workflows can wait for external signals:

Sending Signals

External systems can signal waiting workflows:

Retry Logic

Workflows automatically retry failed steps:

Monitoring

In the Admin DashboardWorkflows tab:
  • View active workflow instances
  • See current step and status
  • View history of completed steps
  • Send signals to waiting workflows
  • Cancel stuck workflows

Region Requirements

Durable Workflows require deployment to us-east-2 (Ohio).
When creating a project that needs Durable Workflows, select us-east-2 as your region.

Examples

Approval Flow

Payment Retry

Order Fulfillment

Limitations

File Storage

Learn how to handle file uploads.