AWS Step Functions to AWS Lambda durable functions

AWS Step Functions → (1) AWS Lambda durable function (async) → (2) AWS Lambda durable function (sync)

Create a Step Functions workflow to invoke Lambda durable functions synchronously and asynchronously with checkpointing.

This pattern demonstrates how to integrate AWS Lambda durable functions into an AWS Step Functions workflow.
It covers both synchronous invocation (using default Request Response pattern) and asynchronous invocation (using the Step Function Wait for Callback with Task Token integration pattern) of durable Lambda functions.
The pattern addresses the challenge of running long-running Lambda functions (beyond 15 minutes) within a Step Functions orchestration, using asynchronous invocation and durable checkpointing.
Lambda durable functions use a checkpoint/replay mechanism that allows Lambda executions to run for up to one year, automatically recovering from interruptions.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/cdk-stepfunction-durable-lambda-function

Deploy

python3 -m venv .venvsource .venv/bin/activatepython3 -m pip install -r requirements.txtcdk synthcdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

cdk destroy

Created by:

Akshay Singhal

Akshay Singhal

Akshay Singhal is a Sr. Technical Account Manager (TAM) for AWS Enterprise Support focusing on the Security ISV (Independent Software Vendors) segment and loves everything serverless.

Follow on LinkedIn