aws-lambda-durable-functions

Build long-running multi-step AWS Lambda workflows with checkpointed state and automatic retries.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill aws-lambda-durable-functions-sakicodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-lambda-durable-functions
Source: https://github.com/sakicodes/BuildFestHackathon26/tree/main/.agents/skills/aws-lambda-durable-functions
Command: npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill aws-lambda-durable-functions-sakicodes

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Standard Lambda functions lose all progress when interrupted, making long-running multi-step workflows fragile and hard to recover. This Skill guides you through building durable Lambda functions that checkpoint state, survive interruptions, and can run for up to one year with automatic retry and replay semantics. ## Core Features & Use Cases - Durable Execution Patterns: Implement steps, waits, callbacks, child contexts, and parallel/map operations using the durable-execution-sdk for TypeScript and Python. - Replay Model Guardrails: Enforce critical rules like keeping non-deterministic code inside steps, avoiding nested durable operations, and returning values instead of mutating closures. - Error Handling & Saga Pattern: Apply retry strategies, compensating transactions, circuit breakers, and unrecoverable error semantics for distributed workflows. - Testing & Deployment: Test locally with LocalDurableTestRunner or DurableFunctionTestRunner, and deploy with CloudFormation, CDK, or SAM using qualified ARNs. - Use Case: Build an order-processing workflow that reserves inventory, charges payment, waits up to 24 hours for human approval via callback, and automatically runs compensating refunds if any step fails. ## Quick Start Ask the AI to create a durable Lambda function in TypeScript that fetches user data in a step, waits five seconds, and then processes the result with automatic retries.

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 a durable AWS Lambda 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 use context.step for checkpointed operations.

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 when calling aws lambda invoke.

What is the replay model in Lambda durable functions?

Durable functions re-run code from the beginning on every invocation, with completed steps returning checkpointed results without re-executing. All non-deterministic code like Date.now(), Math.random(), and API calls must run inside steps to avoid corrupting execution state.

Can I nest step or wait operations inside another step?

No, durable operations cannot be nested inside a step's callback. Use context.runInChildContext to group multiple operations like steps, waits, and invokes into a single logical unit instead.

How do I test Lambda durable functions locally?

Use LocalDurableTestRunner for TypeScript or DurableFunctionTestRunner for Python from the testing SDK packages. Always name operations and retrieve them by name rather than index, and use skipTime to fast-forward through waits.

What IAM permissions do durable Lambda functions need?

The execution role must have the AWSLambdaBasicDurableExecutionRolePolicy managed policy, which grants lambda:CheckpointDurableExecution and lambda:GetDurableExecutionState. External callback systems additionally need lambda:SendDurableExecutionCallbackSuccess and Failure permissions.