CertBrain
CoursesBlog
Sign in
← Back to decks
Sign in to save your progress, vote, and build your own decks.Sign in

Vector Databases on AWS

A vector database stores embeddings, the lists of numbers that capture what a piece of text or an image means, and finds the stored items closest in meaning to a query. Every RAG application needs one. AWS offers several services that can play this role, and the exam expects you to pick the one…

9 cards
Study this deck

Vector Databases on AWS

A vector database stores embeddings, the lists of numbers that capture what a piece of text or an image means, and finds the stored items closest in meaning to a query. Every RAG application needs one. AWS offers several services that can play this role, and the exam expects you to pick the one that fits a scenario's existing data, skills and query needs.

What a Vector Store Does

A vector store keeps each embedding together with its original text and some metadata, such as the source file and date. When a query arrives, it is embedded too, and the store runs a similarity search, often called k-nearest neighbor (k-NN) search, to return the closest matches. Good vector stores also let you filter by metadata, for example "only documents from the HR folder".

Amazon OpenSearch Service

OpenSearch is a search and analytics service that supports vector search alongside full-text keyword search, filters and aggregations. Two deployment styles matter:

  • OpenSearch Serverless vector search collections: you don't manage any cluster; capacity scales with the workload. A common default for new RAG projects.
  • OpenSearch Service managed clusters: you size and run the domain yourself, for teams that already operate OpenSearch.

Choose OpenSearch when vector search must combine with keyword search, rich filtering, or large scale.

Aurora and RDS for PostgreSQL with pgvector

pgvector is an open-source PostgreSQL extension that adds a vector data type and similarity search. It's available in both Amazon Aurora PostgreSQL-Compatible Edition and Amazon RDS for PostgreSQL. This lets a team keep embeddings in the same relational database as its business data and query both with SQL. Aurora PostgreSQL is also a supported vector store for Amazon Bedrock Knowledge Bases.

Choose this route when the company already runs PostgreSQL, has SQL skills, or wants vectors joined with relational records.

Amazon Neptune Analytics

Neptune is AWS's graph database family. Neptune Analytics graphs can hold a vector index, and Amazon Bedrock Knowledge Bases uses them for GraphRAG. GraphRAG first finds relevant chunks by vector search, then follows the relationships between entities in a graph to gather connected facts. That helps when answering a question means linking facts spread across several documents, for example which products contain a part from a supplier named in a recall notice.

Choosing a Store

Scenario clueLikely choice
New RAG project, no servers to manageOpenSearch Serverless vector search collection
Vector search plus keyword search and filtersAmazon OpenSearch Service
Data and skills already in PostgreSQLAurora or RDS for PostgreSQL with pgvector
Answers need relationships across documentsNeptune Analytics (GraphRAG)

Amazon Bedrock Knowledge Bases can also connect to other supported stores, including Amazon S3 Vectors and some third-party databases. Its quick-create option can set up a vector store for you.

On the Exam

Look for what the company already has or needs. "Already uses PostgreSQL" points to pgvector. "Serverless" or "keyword plus semantic search" points to OpenSearch. "Relationships", "connected facts" or "graph" points to Neptune. A plain key-value database with no vector search is a common wrong answer.

Quiz me on this
A retailer already keeps its product catalog in Amazon Aurora PostgreSQL, and its team is skilled in SQL. It wants to store product description embeddings next to the catalog rows and query both together. Which approach fits BEST?
  1. ✓ Use the pgvector extension in Aurora PostgreSQL
  2. Copy the catalog into Amazon DynamoDB key-value items
  3. Store the embeddings as files in an S3 bucket only
  4. Rebuild the catalog in an Amazon Neptune graph
A startup is building its first RAG application and doesn't want to size or manage any database servers. It also wants to combine semantic search with keyword search and filters. Which vector store fits BEST?
  1. Amazon RDS for PostgreSQL on a fixed instance
  2. Amazon ElastiCache as a session store
  3. ✓ An OpenSearch Serverless vector search collection
  4. An Amazon EC2 instance running a self-managed database
A manufacturer's assistant must answer questions such as "Which of our products contain parts from suppliers named in this recall notice?", where the answer depends on links spread across many documents. Plain vector search returns the right passages but misses the connections. Which design helps MOST?
  1. Raise the number of chunks that each plain vector search returns to the model
  2. Switch the vector store to a cheaper storage class
  3. Fine-tune the model on the recall notices only
  4. ✓ Use GraphRAG with Neptune Analytics in a knowledge base
A clinic runs its scheduling app on Amazon RDS for PostgreSQL and wants to add similarity search over appointment notes inside that same database. What should it use?
  1. Amazon Polly voices
  2. ✓ The pgvector extension
  3. Amazon Comprehend custom classification
  4. AWS Glue DataBrew
Vector store
A database that stores embeddings with their text and metadata, and returns the items closest in meaning to a query.
pgvector
Open-source PostgreSQL extension for storing and querying vector embeddings, supported in Amazon RDS for PostgreSQL.
OpenSearch Serverless vector search collection
Serverless vector store that combines similarity search with full-text search and filtering. No cluster to manage.
GraphRAG (Neptune Analytics)
Bedrock Knowledge Bases feature that adds graph relationships to vector search, connecting facts across documents.
k-NN search
k-nearest neighbor search: finds the k stored vectors closest to the query vector. The core operation of a vector store.