
Stop Running a Separate Vector Database for Your DynamoDB-Backed App
DynamoDB can now store vector embeddings alongside your operational data and run similarity searches directly against that data — with single-digit millisecond latency at 99%+ recall, at any scale, including trillions of vectors. No separate vector database. No sync pipelines. No infrastructure to manage.
Series: Learn-Agentic-AI-RAG-Vector-by-doing (2 articles)
- 1Stop Running a Separate Vector Database for Your DynamoDB-Backed App This article
DynamoDB can now store vector embeddings alongside your operational data and run similarity searches directly against that data — with single-digit millisecond latency at 99%+ recall, at any scale, including trillions of vectors. No separate vector database. No sync pipelines. No infrastructure to manage.
This blog unpacks what that announcement really means, walks through a concrete hands-on example, and helps you decide when this feature is the right tool for your architecture.
But first let's touch upon the below main topics to understand to dictate the entire story
- The Vector Search Problem (Before & After)
- Foundations: Embeddings & Vector Similarity
- Inside DynamoDB Vector Search: Architecture & Capabilities
- Hands-On: Build a Semantic Product Search (Console + Python)
- Real-World Use Cases
- In Agentic RAG chatbot where Bedrock Knowledge base & Dynamo DB Vector feature fits in ?
- Key Takeaways DynamoDB can now store vector embeddings alongside your operational data and run similarity searches directly against that data — with single-digit millisecond latency at 99%+ recall, at any scale, including trillions of vectors. No separate vector database. No sync pipelines. No infrastructure to manage. This blog unpacks what that announcement really means, walks through a concrete hands-on example, and helps you decide when this feature is the right tool for your architecture.1. The Vector Search Problem
The "Before" State: A Two-Database Headache
Until this announcement, building semantic search or retrieval-augmented generation (RAG) on top of DynamoDB meant managing two systems in parallel:-

Bur prior to anything let's understand or start from scratch .
What is a Vector Embedding?
A vector embedding is a numerical representation of content — text, images, audio, or structured data — produced by a machine learning model. The key property is that semantically similar content produces numerically similar vectors.
For example, if you pass three product descriptions through an embedding model:-
"Lightweight trail running shoes with breathable mesh upper"
"Ultra-light summer running sneakers for road and trail"
"Heavy-duty steel-toed work boots for construction sites"
The first two descriptions will produce vectors that are close together in high-dimensional space. The third will land far away from them, because it describes something semantically different.
This is the foundation of semantic search: instead of matching keywords, you match meaning.
Distance Functions: Measuring Similarity
How you measure "closeness" between two vectors depends on the distance function you choose. DynamoDB supports three:-
Distance
Function | Best For | Score
Interpretation |
|---|---|---|
Cosine | Comparing
text semantics; ignores magnitude | Lower
= more similar (0 = identical) |
Euclidean | When
magnitude of values matters (e.g., clustering by numeric features) | Lower
= more similar (0 = identical) |
Dot Product | Recommendation
systems where both direction and magnitude convey signal | Higher=more
similar |
Rule of thumb: Match the distance function to the one used to train your embedding model. If you're using Amazon Bedrock Titan Text Embeddings or OpenAI's
text-embedding-3-small , Cosine is the right default for text use cases.Dimensions: The Size of Your Vector
Every embedding model outputs a fixed-length vector. For example:
- Amazon Bedrock Titan Text Embeddings: 1536 dimensions
- OpenAI
text-embedding-3-small: 1536 dimensions
- Cohere Embed v3: up to 1024 dimensions**Inside DynamoDB Vector Search: Architecture & CapabilitiesDynamoDB vector search supports up to 4096 dimensions, which covers all major embedding models available today.**3. Inside DynamoDB Vector Search:- DynamoDB does not require a new data type for vectors. Embeddings are stored using the existing
ListofNumbertype — a list of floats where each element represents one dimension of the vector:-
{
"productId": {"S": "SHOE-001"},
"name": {"S": "Trail Runner X2"},
"price": {"N": "129.99"},
"descriptionEmbedding": {
"L": [
{"N": "0.0231"}, {"N": "-0.1147"}, {"N": "0.0893"}, ...
// 1536 total values for a Titan-generated embedding
]
}
}This means you can start adding embeddings to an existing table with a simple
UpdateItem call — no schema migration, no table restructuring.The Vector Index
Vector search operates through a new index type you create on an attribute containing embeddings. When creating a vector index, you configure:-
The Partition Key: Scaling and Scoping
The vector index partition key is one of the most important design decisions. It controls how DynamoDB distributes your vectors across internal partitions, which enables:
- Horizontal scaling — vectors are spread across partitions so the index grows as your data grows
- Scoped search — each
SearchVectorscall is scoped to a single partition key value, meaning you search within a segment of your data
- This scoping is architecturally powerful. If you run a multi-marketplace e-commerce platform, a partition key of
marketplacemeans a search for "running shoes" in the US marketplace won't scan EU marketplace data — giving you both accuracy and efficiency.The SearchVectors API :-
The new
SearchVectors API is the query interface for vector indexes . Inline Filtering vs Post-Filtering
A critical detail: DynamoDB vector search uses inline filtering, not post-processing filtering. This means:
- Filters are applied during the vector search, not after results are retrieved
- Filters support exact-match conditions only (
category = "footwear")
- Range conditions (
BETWEEN,BEGINS_WITH) are not supported on filter attributes
Inline filtering is significantly more efficient than post-filtering (used by some dedicated vector databases), because it reduces the candidate set before ranking rather than discarding results after the top-K has already been computed.
Hands-On: Build a Semantic Product Search :-
Let's build an end-to-end semantic product search feature for an online sporting goods store on Dynamo DB vector search .


Now add an item with Semantic search with AWS own embedding model such as "amazon.titan-embed-text-v1" which ensures customers asks diffirent sets of questions in semnatic manner in the below 1 additional attributes as follows :-
{ "productId": {"S": "SHOE-001"}, "marketplace": {"S": "US"}, "category": {"S": "footwear"}, "name": {"S": "Trail Runner X2"}, "price": {"N": "129.99"}, "description": {"S": "Lightweight trail running shoes for summer trail runs"}, "descriptionEmbedding": { "L": [ {"N": "0.921"}, {"N": "0.134"}, {"N": "0.089"}, {"N": "0.045"} ] }}

Now why we navigate to Create Index ?
This below image dictates everything . That's why most of the AI Agents tend to go for RAG structure .

Click on Create Index :-

Then under Indexes you will view this kind of page :-

Now we have confirm or validate by Explore table items whether those products items can be appeared by vector search & its doscovered all required items as defined :-
In Agentic RAG chatbot where Bedrock Knowledge base & Dynamo DB Vector feature fits in ?
Bedrock Knowledge Base = your agent's library — static documents, FAQs, policies, manuals. Answers "what is / how does" questions.
DynamoDB Vector Search = your agent's live database — real-time products, orders, user profiles. Answers "what's available right now for me" questions.

Rough Pricing Signals (August 2026)
DynamoDB vector search uses the same pay-per-request pricing as DynamoDB itself — you pay for
SearchVectors read request units (similar to standard read operations) and storage per GB. There is no separate charge for vector indexes.Check the Amazon DynamoDB pricing page for the latest figures. For workloads already on DynamoDB, the marginal cost of adding vector search is typically very low compared to running and maintaining a dedicated vector database alongside it.
7. Key Takeaways
Amazon DynamoDB vector search is generally available today in all commercial AWS Regions, including AWS GovCloud (US). Here's what you need to remember:
What it does:
- Stores vector embeddings natively using the existing
ListofNumbertype
- Supports up to 4096 dimensions — covers all major embedding models
- Delivers single-digit millisecond latency at 99%+ recall
- Scales to trillions of vectors with zero infrastructure management
How it's different:
- Vectors live with your operational data in the same table — no sync pipeline
- A new
VectorIndexindex type, separate from GSIs and LSIs
- A new
SearchVectorsAPI that returns ranked results with operational attributes in one call
- Inline filtering (exact-match only) reduces candidate sets before ranking
When to reach for it:
- You're building RAG, agentic memory, semantic search, or recommendation features on top of existing DynamoDB data
- You want AI capabilities without adding a second database to your operational architecture
- You need serverless, fully managed scaling with predictable latency
Series: Learn-Agentic-AI-RAG-Vector-by-doing (2 articles)
- 1Stop Running a Separate Vector Database for Your DynamoDB-Backed App This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article