Repository navigation
Commit ee54c16
committed
feat(dmap): add distributed map operation
Add ctx.distributed_map with inline, S3, and reader sources, the config,
processor, completion, and destination types, the result types, and
function-authoring helpers for item and batch handlers.
Serialization lives in lambda_service.py with one dataclass per API shape.
Translation happens only in the executor, so config.py has no runtime
import from lambda_service. Tests are split by layer.
Items, Output, and the record body are opaque strings, matching the API
model, so any serdes works rather than JSON only.
Every terminal state resolves with the summary, and throw_if_error() opts
into raising. Missing details or a missing completion reason raise
ExecutionError.
The processor factories are batch, item_failures, and item_results. Source
and destination factories are InlineSource, S3Source, ReaderSource, and
S3Destination. Retry is max_retry_attempts and max_retry_duration on the
processor. Passing DistributedMapResultConfig selects the DistributedMapResult
return type statically. Only the result types and their enums are exported
from the package root.1 parent 9157022 commit ee54c16
20 files changed
Lines changed: 5215 additions & 3 deletions
File tree
- packages/aws-durable-execution-sdk-python
- src/aws_durable_execution_sdk_python
- dmap
- operation
- tests
- dmap
- e2e
- operation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
30 | 46 | | |
31 | 47 | | |
32 | 48 | | |
| |||
35 | 51 | | |
36 | 52 | | |
37 | 53 | | |
| 54 | + | |
38 | 55 | | |
39 | 56 | | |
40 | 57 | | |
| |||
69 | 86 | | |
70 | 87 | | |
71 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
72 | 97 | | |
73 | 98 | | |
74 | 99 | | |
| |||
87 | 112 | | |
88 | 113 | | |
89 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
90 | 120 | | |
91 | 121 | | |
92 | 122 | | |
| |||
0 commit comments