Skip to content

aws-samples/sample-lambda-durable-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

AWS Durable Functions Examples

This repository contains example projects demonstrating AWS Durable Functions - a Lambda extension that enables long-running, stateful workflows that can execute for up to one year.

Table of Contents

About this Repo

This repo provides practical examples of AWS Durable Functions organized by industry and use case. Each example demonstrates real-world scenarios where durable execution patterns solve complex business problems that require long-running workflows, human-in-the-loop processes, or external system integrations.

The examples are designed to be:

  • Industry-specific: Organized by vertical (Financial Services, Healthcare, Retail, etc.) to showcase relevant use cases
  • Production-ready patterns: Demonstrate best practices for error handling, state management, and workflow orchestration
  • Deployable: Include complete infrastructure-as-code using AWS CDK or SAM templates

We welcome contributions in the form of fixes to existing examples or new industry-specific use cases. For more information, please see the CONTRIBUTING guide.

This is considered an intermediate learning resource and should be referenced alongside the AWS Durable Functions documentation.

What are Durable Functions?

AWS Durable Functions extend AWS Lambda to support long-running, stateful workflows through automatic checkpointing and replay, while only paying for active compute time. Key capabilities include:

  • Long-running executions: Run workflows for up to one year with automatic state recovery
  • Checkpointing: Functions save their state at defined points and resume after interruptions
  • Cost-efficient waiting: Pause execution without consuming resources during wait periods
  • External callbacks: Wait for external events (webhooks, human approval, third-party APIs) without staying active
  • Durable promises: Persistent promises that survive system restarts and failures

Examples

Examples are organized by industry vertical to demonstrate domain-specific use cases:

Financial Services (FSI)

Example Description Technologies
Fraud Detection Multi-step transaction processing with risk scoring, human-in-the-loop verification, and conditional workflow branching Lambda, TypeScript, AWS CDK, SAM

Retail

Example Description Technologies
Order Processing Multi-step order workflow with AI validation (Bedrock), saga compensation, inventory management, and human-in-the-loop payment approval Lambda, TypeScript, AWS CDK, Bedrock

Coming Soon

Additional industry verticals and use cases will be added over time.

Getting Started

Prerequisites

Review the README found within the folder of each sample. Each sample has its own unique set of requirements.

Learning Resources

Official Resources

Example Documentation

Each example includes detailed documentation:

  • Architecture diagrams and workflow explanations
  • Step-by-step deployment guides
  • Testing and invocation instructions
  • Best practices and design patterns

License

This library is licensed under the Apache 2.0 License.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors