URL/Location
https://docs.aws.amazon.com/durable-execution/getting-started/key-concepts/
Describe What's Incorrect or Lacking
Document clearly that A durable execution is the complete lifecycle of a durable function, and it can include multiple individual invocations of the Lambda function. Each invocation is bound by the maximum Lambda invocation timeout.
Recommend best practice to chunk work in Max Lambda Invocation Timeout segments, rather than rely on backend retrying on timeout.
import { DurableContext, withDurableExecution } from "@aws/durable-execution-sdk-js";
export const handler = withDurableExecution(
async (event: any, context: DurableContext) => {
const results = await context.map(
"process-batches",
event.batches,
async (ctx: DurableContext, batch: any) => await ctx.invoke("my-worker-function:prod", batch),
{ maxConcurrency: 10 }
);
return results.getResults();
}
);
Each batch runs as its own execution with a fresh 900 second window. The parent suspends while batches run, so the retry limit is never in play and it does not time out.
Tune maxConcurrency to your requirements. 1 is sequential, if your workload has to be serial. (
If your workload spends idle time waiting for an external system, consider callback or wait for condition.
https://docs.aws.amazon.com/durable-execution/patterns/best-practices/determinism/
Suggested Improvement
No response
Additional Context
No response
URL/Location
https://docs.aws.amazon.com/durable-execution/getting-started/key-concepts/
Describe What's Incorrect or Lacking
Document clearly that A durable execution is the complete lifecycle of a durable function, and it can include multiple individual invocations of the Lambda function. Each invocation is bound by the maximum Lambda invocation timeout.
Recommend best practice to chunk work in Max Lambda Invocation Timeout segments, rather than rely on backend retrying on timeout.
Each batch runs as its own execution with a fresh 900 second window. The parent suspends while batches run, so the retry limit is never in play and it does not time out.
Tune maxConcurrency to your requirements. 1 is sequential, if your workload has to be serial. (
If your workload spends idle time waiting for an external system, consider callback or wait for condition.
https://docs.aws.amazon.com/durable-execution/patterns/best-practices/determinism/
Suggested Improvement
No response
Additional Context
No response