durable-execution-sdk-js.serdes.md
December 2, 2025 ยท View on GitHub
Home > @aws/durable-execution-sdk-js > Serdes
Serdes interface
Serdes (Serialization/Deserialization) interface for durable functions. This interface allows customizing how data is serialized and deserialized when persisting state in durable functions.
Both methods are async to support custom implementations that need to interact with external services (e.g., AWS S3, DynamoDB, etc.)
Signature:
export interface Serdes<T>
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
(data: string | undefined, context: SerdesContext) => Promise<T | undefined> |
Deserializes a string back to the original value | ||
|
(value: T | undefined, context: SerdesContext) => Promise<string | undefined> |
Serializes a value to a string representation |