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

deserialize

(data: string | undefined, context: SerdesContext) => Promise<T | undefined>

Deserializes a string back to the original value

serialize

(value: T | undefined, context: SerdesContext) => Promise<string | undefined>

Serializes a value to a string representation