AWS today unveiled strands‑dynamodb‑storage, a free, open‑source library that plugs the Strands Agents SDK into a single Amazon DynamoDB table. Available on PyPI for Python 3.10+ and on npm for Node.js 20+, the package is released under Apache 2.0.

The Strands Agents SDK is a lightweight, model‑driven framework that lets developers craft AI agents with just a few lines of code. At its core the SDK defines a small, byte‑oriented Storage contract with four operations: write, read, delete, and list. All of the SDK’s internal components—the Session Manager, Memory Manager, context offloader, and transcript—use this contract, so a single storage implementation can provide durability for every aspect of an agent’s state.

strands‑dynamodb‑storage translates the SDK’s slash‑separated keys directly onto DynamoDB’s key schema. The first two segments of a key become the partition key (pk) and the remainder becomes the sort key (sk). For example, the key session/user‑42/snapshot.json is stored with pk = session/user‑42 and sk = snapshot.json. Listing a prefix is implemented with a native Query that uses DynamoDB’s begins_with operator, eliminating the need for table scans.

Key features of the package include:

S3 offload for large values – When a bucket name is supplied, values larger than DynamoDB’s 400 KB item limit are stored in S3 and a pointer item remains in DynamoDB. Without a bucket, writes above the limit fail with a validation error. Optional gzip compression – Compression is applied before the size check, keeping compressible data inline. Optional TTL – A DynamoDB TTL attribute can be stamped on writes; reads and listings filter out expired items. Multi‑tenant prefixes – A constructor‑bound key prefix isolates operations for different tenants.

The library does not create infrastructure. Users must first create a DynamoDB table with a string partition key (pk) and string sort key (sk). The README supplies a complete provisioning walkthrough and a least‑privilege IAM policy that allows the four core DynamoDB operations, SearchVectors for semantic search, and the three S3 operations required for offload.

Semantic long‑term memory is supported through DynamoDB vector indexes. When a table is created with a vector index, the index name, dimensions, and distance function are fixed. The SDK’s Memory Manager can embed text using Amazon Titan Text Embeddings V2 (which returns 1,024‑dimensional vectors) and store the vector alongside the memory payload. Retrieval is performed with SearchVectors, scoped to a partition, so a tenant’s search does not read other tenants’ data. The package’s README shows how to embed on write, store metadata, and perform a similarity search that returns the most similar memories first.

To integrate the storage backend into an agent, developers instantiate the storage class and pass it to the agent’s session manager or to the agent itself. The SDK then automatically snapshots the conversation on each invocation and restores it when the same session returns. The Memory Manager can be wired with a custom MemoryStore that implements the SDK’s MemoryStore protocol, enabling the agent to call a search_memory tool that retrieves relevant memories from DynamoDB.

Pricing considerations are straightforward: users pay for the DynamoDB table under standard pricing for reads, writes, and storage; vector indexes are billed separately for SearchVectors and write units; S3 offload incurs standard request and storage costs; and embedding generation is billed by the chosen model (e.g., Amazon Titan). The package itself is free.

The release notes highlight several caveats:

Vector index parameters are immutable; adding a new configuration requires a new index. Vector indexes are eventually consistent, so a memory written immediately may not appear in a search until propagation completes. TTL filtering is applied at read time; SearchVectors may return items that have already expired but not yet been physically removed. Listing requires a prefix that covers a full scope and ID; broad listings are rejected. * If TTL is enabled on offloaded values, an S3 lifecycle rule is needed to delete the object after DynamoDB removes the pointer.

After experimentation, users should delete the DynamoDB table and any S3 bucket used for offload to avoid ongoing charges.

In short, strands‑dynamodb‑storage offers a single‑table, serverless backend that supports session persistence, large‑value offload, optional compression, TTL, and multi‑tenant isolation for Strands Agents. By leveraging DynamoDB’s native vector indexes, the same table can also power semantic memory search, eliminating the need for a separate vector database. The library is hosted on GitHub and can be installed with pip or npm, making it easy for developers to adopt durable, scalable storage for AI agents.