aws-lambda-durable-functions

Builds long-running multi-step AWS Lambda durable functions with checkpointing, retries, and replay-safe orchestration.

Updated Jul 21, 2026
One-click install
npx skills add https://github.com/richardnroman/Synthetic-Data-Exchange-Licensing-Platform --skill aws-lambda-durable-functions-richardnroman
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: aws-lambda-durable-functions
Source: https://github.com/richardnroman/Synthetic-Data-Exchange-Licensing-Platform/tree/main/.agents/skills/aws-lambda-durable-functions
Command: npx skills add https://github.com/richardnroman/Synthetic-Data-Exchange-Licensing-Platform --skill aws-lambda-durable-functions-richardnroman

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @aws/durable-execution-sdk-js, @aws/durable-execution-sdk-js-testing, @aws/durable-execution-sdk-js-eslint-plugin, aws-durable-execution-sdk-python, aws-durable-execution-sdk-python-testing, and includes references (resource) components.

What problem does it solve? Writing reliable long-running serverless workflows is error-prone: state is lost on interruption, retries cause duplicate side effects, and non-deterministic code silently corrupts execution on replay. This Skill guides the correct implementation of AWS Lambda durable functions so workflows survive interruptions and run for up to one year. ## Core Features & Use Cases - Replay-Safe Workflow Construction: Enforces the critical replay model rules, including keeping non-deterministic code inside steps, avoiding nested durable operations, and returning values instead of mutating closures. - Orchestration Patterns: Covers steps, waits, callbacks for human-in-the-loop approval, parallel/map concurrency with completion policies, saga compensating transactions, and circuit breakers. - Testing and Deployment: Provides LocalDurableTestRunner and DurableFunctionTestRunner testing patterns plus CloudFormation, CDK, and SAM deployment templates with correct IAM policies and qualified ARN invocation. - Use Case: Build an order-processing workflow that reserves inventory, charges payment, waits up to 24 hours for manager approval via callback, and automatically runs compensating refunds if any step fails. ## Quick Start Ask the assistant to create a TypeScript durable Lambda function that fetches a user in a step, waits five seconds, processes the result, and deploys it with CDK.

Frequently Asked Questions about aws-lambda-durable-functions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an AWS Lambda durable function?▼

Create a new Lambda function with durable execution enabled at creation time, since it cannot be retrofitted to existing functions. Wrap your handler with withDurableExecution in TypeScript or the @durable_execution decorator in Python, then deploy with a version or alias.

Why does my durable function invocation fail with an unqualified ARN error?▼

Durable functions require a qualified ARN: a specific version, an alias, or the $LATEST suffix. Invoking with an unqualified function name fails, so use formats like my-function:1 or my-function:live.

Can I call context.step inside another step in durable functions?▼

No, durable operations cannot be nested inside a step's callback. Use context.runInChildContext to group multiple steps, waits, or invokes within a child context instead.

Why does my durable function produce inconsistent values after a wait?▼

Non-deterministic code like Date.now(), Math.random(), or UUID generation outside steps produces different values on each replay and corrupts state. Move all such operations inside steps so results are checkpointed.

How do I test Lambda durable functions locally?▼

Use LocalDurableTestRunner for TypeScript or DurableFunctionTestRunner for Python from the testing packages. Name all operations, retrieve them by name rather than index, and test replay behavior across multiple invocations.

What IAM permissions do durable Lambda functions need?▼

The execution role must have the AWSLambdaBasicDurableExecutionRolePolicy managed policy, which grants checkpoint and state retrieval permissions. Durable invokes also need lambda:InvokeFunction, and external callback systems need SendDurableExecutionCallback permissions.