You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no per-call serializer override on any durable-execution API. Every checkpoint — step results, callback results, invoke payloads/results, child-context results — is serialized via the `ILambdaSerializer` registered on `ILambdaContext.Serializer`. To customize, register a different `ILambdaSerializer`for the function:
Usage — pass the serializer to the per-step `StepAsync` overload directly. This is
1632
-
the only way to override the registered `ILambdaSerializer` for a single step's
1633
-
checkpoint; it's intentional that there's no `StepConfig.Serializer` knob, so you
1634
-
have one obvious place to opt in (and the type is `ICheckpointSerializer<T>`, not
1635
-
a non-generic marker, so the compiler catches a mismatched `T`):
1636
-
1637
-
```csharp
1638
-
varresult=awaitcontext.StepAsync(
1639
-
async () =>awaitGetLargeData(),
1640
-
newCompressedJsonSerializer<LargeData>(),
1641
-
name: "get_data");
1642
-
```
1643
-
1644
-
> **Status:** the `ICheckpointSerializer<T>` overload is a planned post-v1 addition. Today, all step checkpoints flow through the `ILambdaSerializer` registered on `ILambdaContext.Serializer` — see [NativeAOT compatibility](#nativeaot-compatibility) for how that's wired.
1668
+
The customization applies uniformly to the whole function — there is no way today to swap the format for a single step or a single result type. See [NativeAOT compatibility](#nativeaot-compatibility) for how the registration flows in JIT vs. AOT.
1645
1669
1646
1670
### Class library vs. executable output
1647
1671
@@ -1722,27 +1746,7 @@ The SDK handles overflow transparently:
1722
1746
1723
1747
**Lambda response exceeding 6 MB:** If the final orchestration result exceeds the response payload limit, the SDK checkpoints the result before returning the `DurableExecutionInvocationOutput`. The service reads the result from the checkpoint rather than from the response body.
1724
1748
1725
-
**Guidance for very large results:** For results that are inherently large (multi-MB payloads), use a custom `ICheckpointSerializer<T>` that offloads to external storage (S3, DynamoDB) and returns a reference. This keeps checkpoint sizes small and avoids pagination overhead:
**Guidance for very large results:** For results that are inherently large (multi-MB payloads), do the offload yourself inside the step — write the payload to external storage (S3, DynamoDB) and return a reference (e.g. an S3 key) from the step. The reference is what the SDK serializes and checkpoints, so the checkpoint stays small and pagination is avoided. Subsequent steps fetch the payload from external storage on demand.
1746
1750
1747
1751
---
1748
1752
@@ -1946,7 +1950,7 @@ This is post-v1 work. For the initial release, developers test durable functions
1946
1950
-**Lambda runtime:** Requires the managed .NET 8 runtime or a custom runtime (`provided.al2023`) for NativeAOT deployments.
1947
1951
-**Durable execution service:** The function must be configured with `DurableConfig` (handled automatically by the `[DurableExecution]` source generator).
1948
1952
-**Qualified function identifiers:**`InvokeAsync` requires a version number, alias, or `$LATEST` — unqualified ARNs are not supported for durable invocations.
1949
-
-**Serializable results:** All step return types must be JSON-serializable (or use a custom `ICheckpointSerializer<T>`).
1953
+
-**Serializable results:** All step return types must be serializable by the `ILambdaSerializer` registered on `ILambdaContext.Serializer` (default: `System.Text.Json`).
0 commit comments