aws / aws/aws-durable-execution-docs
[docs]: document clearly that each invocation should fit within invocation timeout
- Dominant language
- Python
- Stars
- 13
- Forks
- 13
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 25
Description
### 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](https://docs.aws.amazon.com/durable-execution/sdk-reference/operations/callback/) or [wait for condition](https://docs.aws.amazon.com/durable-execution/sdk-reference/operations/wait-for-condition/).
https://docs.aws.amazon.com/durable-execution/patterns/best-practices/determinism/
### Suggested Improvement
_No response_
### Additional Context
_No response_
Contributor guide
Research direction
Start with the key concepts page at https://docs.aws.amazon.com/durable-execution/getting-started/key-concepts/ and compare the determinism best-practices page. Update the documentation to explain that each Lambda invocation has its own timeout, while a durable execution can span multiple invocations, and clarify the batching, concurrency, callback, and wait-for-condition guidance. Done means the timeout boundary and recommended chunking approach are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- cloud, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 76/100