Choosing a vector database for your generative AI applications
Taking the first step
|
Purpose |
Help you compare AWS vector database options for your generative AI workload. |
|
Last updated |
October 30, 2026 |
|
Covered services |
Introduction
Vectors are numerical representations of data such as text, images, or audio. These representations, called embeddings, capture the meaning of the data by turning each item into a series of numbers that place similar items close together. An embedding model is a type of foundation model that creates these embeddings. On AWS, you can generate embeddings with models available through Amazon Bedrock, such as Amazon Titan Text Embeddings and Cohere Embed. For the full list, see Supported models for vector embeddings.
A vector database stores these embeddings and runs similarity searches across them to return the most relevant results quickly, even across billions of vectors. On AWS, vector search is a capability you can add to many of the databases and services you might already run, rather than a separate database you must adopt. This idea, adding vectors where your data already lives, means that many workloads can keep embeddings next to their existing data instead of moving them into a dedicated store. For a new workload, a few requirements such as latency, scale, and cost point to a fit, and Amazon Bedrock Knowledge Bases offers a fully managed option when you want AWS to run the retrieval pipeline for you.
Similarity search over vectors is the foundation of Retrieval Augmented Generation (RAG), a technique that improves a foundation model's responses by retrieving relevant context from your own data. Teams use this pattern to power enterprise knowledge assistants, semantic document search, and recommendation systems. This guide focuses on vector search over unstructured data, such as documents and images that you convert into embeddings. If your data is structured and tabular, Amazon Bedrock Knowledge Bases can instead query it directly by converting natural language into SQL. For more information, see Turning data into a knowledge base.
AWS offers more than 10 services that can store and search vectors, so the field can be hard to narrow. As you compare options, weigh the three tradeoffs that most affect the decision:
-
Existing store versus new store – You can add vector search to a data store you already run, which keeps vectors next to your existing data and skills, or you can adopt a store dedicated to vector search.
-
Fully managed versus self-managed – Amazon Bedrock Knowledge Bases runs the retrieval pipeline for you, whereas managing your own store gives you full control over configuration and tuning.
-
Cost, latency, and scale – In-memory stores return results fastest but cost more, while storage-tier options cost less at scale in exchange for higher latency. The volume of vectors you expect can narrow the options further.
Understand
AWS provides vector search across many of the services and databases you might already run, so in many cases you can add vectors where your data already lives rather than adopt a separate vector database. It also offers a fully managed RAG option, Amazon Bedrock Knowledge Bases, when you want AWS to run the retrieval pipeline for you. These options fall into groups by design pattern: managed RAG, search and analytics, operational databases, in-memory stores, and low-cost storage. Each group optimizes for different priorities, such as setup effort, latency, scale, and how closely vectors sit to your operational data.
The following diagram shows how AWS has added vector search across its database and search services. Use the groups that follow to narrow your options.
Vector search capabilities
The following table summarizes each option so you can match it to your needs.
| Service | Amazon Bedrock Knowledge Bases | Indexing | Max dimensions | Vector volume | QPS | Hybrid search | Read latency | Write latency |
|---|---|---|---|---|---|---|---|---|
OpenSearch Serverless |
Yes (Quick Create) |
HNSW (GPU-accelerated) |
16,000 |
Hundreds of billions |
Tens of thousands |
Yes |
10–100 ms |
Near real-time |
OpenSearch Managed Clusters |
Yes |
HNSW, IVF (GPU-accelerated) |
16,000 |
Hundreds of billions |
Tens of thousands |
Yes |
10–100 ms |
Near real-time |
Amazon Neptune Analytics |
Yes (Quick Create) |
Native graph and vector |
Up to 65,535 |
2–3 billion |
Hundreds to thousands |
Graph and vector |
10–100 ms |
Not specified |
Amazon DynamoDB |
No |
HNSW (ANN) |
4,096 |
Billions |
Virtually unlimited (thousands per partition key) |
No |
Sub-10 ms |
Near real-time |
Amazon Aurora PostgreSQL (pgvector) |
Yes (Quick Create) |
HNSW, IVFFlat |
2,000 indexed |
Hundreds of billions |
Thousands |
Partial (SQL) |
10–100 ms |
Immediate |
Amazon DocumentDB |
No |
HNSW, IVFFlat |
2,000 indexed |
Millions |
Not specified |
Partial |
Low ms |
Not specified |
Amazon ElastiCache (Valkey) |
No |
HNSW, FLAT |
Not specified |
1 billion+ |
Thousands |
Partial |
Microsecond |
Immediate |
Amazon MemoryDB |
No |
HNSW |
32,768 |
Millions |
Not specified |
Partial |
Sub-10 ms |
Near real-time |
Amazon S3 Vectors |
Yes |
Automatic |
4,096 |
2 billion per index |
Low hundreds per index |
No |
Sub-second |
Batch |
The Amazon Bedrock Knowledge Bases column shows whether a store is supported by a customer-managed knowledge base, where Amazon Bedrock runs retrieval over the store you provide. With a managed knowledge base, Amazon Bedrock manages the vector store for you, so it isn't tied to a specific store in this column.
Consider
When you add vector search on AWS, evaluate the following criteria. Each one describes a factor to think about and the options that relate to it.
Choose
Now that you know the criteria, you can choose the AWS vector database that fits your workload. The following table maps common needs to an option and an alternative.
| Your primary need | Option | Other option |
|---|---|---|
Existing AWS data store |
Add vector search to the store you already run |
None |
Fully managed RAG pipeline |
Amazon Bedrock Knowledge Bases (over a supported store) |
None |
Hybrid keyword and semantic search |
OpenSearch Serverless |
OpenSearch Managed Clusters |
Real-time, low-latency search |
Amazon ElastiCache (Valkey) |
Amazon MemoryDB or OpenSearch Managed Clusters |
Low-latency vector search co-located with operational data |
Amazon DynamoDB |
Amazon Aurora PostgreSQL |
Graph-aware retrieval (GraphRAG) |
Amazon Neptune Analytics |
None |
Relational data with SQL |
Amazon Aurora PostgreSQL (pgvector) |
None |
Low-cost storage and infrequent access or low QPS |
Amazon S3 Vectors |
OpenSearch Managed Clusters (UltraWarm and cold tiers) or OpenSearch Serverless |
New workload with no single dominant requirement |
OpenSearch Serverless |
OpenSearch Managed Clusters |
Compare options by the level of management you want
Amazon Bedrock Knowledge Bases is a managed option that runs the RAG pipeline for you over a supported vector store, which reduces setup and operational work. Running your own vector database gives you more control over the retrieval pipeline. Setup effort and control are the two factors that shape this choice.
Use
After you choose a vector database, use these resources to get started. The tabs group the options by the same categories as the Understand section.
Explore
Explore these resources for deeper comparisons and RAG guidance.
-
Choosing an AWS vector database for RAG use cases – AWS Prescriptive Guidance. A deep technical comparison for data scientists, MLOps engineers, and AI researchers that covers specs, indexing, and cost.
-
Retrieval Augmented Generation options and architectures on AWS – AWS Prescriptive Guidance. A framework to choose managed or custom RAG.
-
Key considerations when choosing a database for your generative AI applications
– AWS Database Blog. How to pick a database for generative AI. -
Amazon OpenSearch Service vector database capabilities revisited
– AWS Big Data Blog. An updated look at how OpenSearch supports vector search, embeddings, and hybrid search. -
Building cost-effective RAG applications with Amazon Bedrock Knowledge Bases and Amazon S3 Vectors
– AWS Machine Learning Blog. Using Amazon S3 Vectors as a low-cost vector store for RAG.