AIP-C01 Vector Store Solutions: Architecture, Metadata, Scale and Sync
A vector store solution for foundation model augmentation is the combination of a vector database, a metadata design, an indexing strategy and a refresh pipeline that lets a generative AI application retrieve the right passages, quickly and from current data. For AIP-C01 Task 1.4 you choose between Amazon Bedrock Knowledge Bases (managed or customer-managed), Amazon OpenSearch Service, Aurora PostgreSQL with pgvector, Amazon S3 Vectors and DynamoDB-backed designs; build metadata that filters and steers retrieval; keep search fast at scale; connect wikis and document systems; and keep every vector in step with its source.
On this page10 sections
- What is a vector store solution for FM augmentation?
- How do you choose a vector store architecture?
- How do you add semantic search to OpenSearch with the Neural plugin and Bedrock?
- How do you build a metadata framework for precise retrieval?
- How do you set up metadata on each vector store?
- How do you keep vector search fast at scale in OpenSearch?
- When should you use multiple indexes or hierarchical indexing?
- How do you connect wikis and document systems to a knowledge base?
- How do you enforce per-user and per-tenant access in retrieval?
- How do you keep a vector store current and accurate?
- Choose a vector store architecture (pgvector beside relational data, DynamoDB with OpenSearch, S3 Vectors tiering, OpenSearch with the Neural plugin and a Bedrock connector) from stated requirements.
- Design knowledge base metadata: correctly named sidecar files, typed attributes, the right filter operator, includeForEmbedding and implicit filtering.
- Configure each vector store so metadata filters work: Aurora JSONB with GIN and iterative scans, keyword mappings and faiss on OpenSearch, non-filterable keys on S3 Vectors.
- Scale OpenSearch vector search with shard sizing, replicas, k-NN memory sizing, disk-based vectors, warmup and bulk-load settings.
- Decide between one index and multiple domain indexes, and build two-tier hierarchical retrieval for large corpora.
- Integrate wikis and document systems with managed connectors or Custom data sources, and enforce per-user or per-tenant access in retrieval.
- Keep vector stores current with incremental, event-driven and scheduled syncs, direct ingestion, deletion policies and deletion protection.
What is a vector store solution for FM augmentation?
A vector store solution is the storage, indexing, metadata and refresh design that lets a generative AI application find the passages most similar in meaning to a question and hand them to a foundation model (FM) as context. The embeddings make semantic search possible; everything around them decides whether retrieval is precise, fast at scale, connected to the right sources and current.
Task 1.4 has five parts, and a production design touches all of them:
| Skill | The question it answers | Typical AWS building blocks |
|---|---|---|
| 1.4.1 Architecture | Where do the vectors live, and next to what? | Amazon Bedrock Knowledge Bases, Amazon OpenSearch Service (with the Neural plugin and a Bedrock connector), Aurora PostgreSQL with pgvector beside Amazon S3 documents, Amazon DynamoDB beside a vector store, Amazon S3 Vectors |
| 1.4.2 Metadata | How do you narrow or steer a search by date, author, product or domain? | Metadata files, typed attributes, filter operators, implicit filtering, reserved source fields |
| 1.4.3 Performance at scale | How does search stay fast as the corpus grows? | OpenSearch shard and replica design, k-NN memory sizing, disk-based vectors, multi-index and hierarchical indexing |
| 1.4.4 Integration | How does content get in from wikis and document systems? | Managed knowledge base connectors, Custom data sources, direct ingestion APIs, ACL-aware retrieval |
| 1.4.5 Maintenance | How do vectors stay current and accurate? | Incremental syncs, event-driven syncs, sync schedules, deletion policies and deletion protection |
Amazon Bedrock now offers two kinds of knowledge base. A Bedrock Managed Knowledge Base runs the datastore for you, with built-in embedding, reranking, native connectors, ACL-aware retrieval and built-in sync schedules. A customer-managed knowledge base writes into a vector store you choose and operate (OpenSearch Serverless or a managed OpenSearch cluster, Aurora PostgreSQL, S3 Vectors and others). Many trade-offs in this lesson come down to that choice.
Chunking strategies, embedding-model choice, hybrid search, reranking and query rewriting belong to Task 1.5 and are taught in the lesson on retrieval mechanisms; this lesson covers the store underneath them.
How do you choose a vector store architecture?
Choose the store by what the vectors must sit next to and how they are queried: relational joins point to pgvector, a DynamoDB system of record points to a vector store fed from DynamoDB, large rarely queried sets point to S3 Vectors, and high-throughput semantic search with rich query features points to OpenSearch.
| Pattern | Use it when | Watch out for |
|---|---|---|
| Aurora PostgreSQL (or RDS for PostgreSQL) with pgvector, documents in S3 | Similarity must be combined with SQL joins to existing relational metadata (clients, matters, billing) in one query, with no new data store | Selective filters on HNSW indexes (see the metadata setup section); DynamoDB and S3 Vectors cannot join |
| DynamoDB as system of record, vectors in OpenSearch | Items already live in DynamoDB and semantic search must follow their changes within minutes | Use the DynamoDB zero-ETL integration with OpenSearch Service (a managed OpenSearch Ingestion pipeline over DynamoDB Streams) instead of writing replication code |
| Amazon S3 Vectors | Very large vector sets queried infrequently, where sub-second latency is fine and nothing should be provisioned | Aimed at low query rates; hot, high-QPS subsets belong in OpenSearch |
| OpenSearch Service or OpenSearch Serverless | Low-latency, high-QPS search, k-NN tuning, keyword plus vector features | Cluster or capacity costs that run all the time |
Keep volatile facts out of the vector index
DynamoDB has no vector index of its own, so it pairs with a vector store rather than replacing one. The split also solves a freshness problem: put stable text (descriptions, policies) and its ID in the vector index, and keep fast-changing values such as price or stock in DynamoDB. After retrieval, read the current values by ID (for example with BatchGetItem). Any design that copies volatile values into the index keeps writing to it and can still serve a value that changed since the last write; reading them at answer time from the system of record cannot go stale.
Tier vectors by query rate
S3 Vectors stores embeddings in vector buckets and vector indexes with pay-per-use pricing and no clusters. It can export a whole vector index to OpenSearch Serverless as a point-in-time copy, so a large archive stays in S3 Vectors while one hot, fixed index is served at high request rates from OpenSearch. Note that OpenSearch Serverless bills for capacity units that stay allocated, so it costs more than S3 Vectors for a handful of queries a day.
How do you add semantic search to OpenSearch with the Neural plugin and Bedrock?
You let OpenSearch create embeddings itself: register a Bedrock model through an ML Commons connector, embed documents at index time with an ingest pipeline that has a text_embedding processor, and embed questions at search time with a neural query. Indexing and query clients then send plain text, and the existing domain gains semantic retrieval without a new store.
- Create a connector to the Bedrock model (for example an Amazon Titan embeddings model) and register a remote model from it.
- Create an ingest pipeline whose
text_embeddingprocessor maps a text field to aknn_vectorfield, and set it as the index's default pipeline. - Query with
neural, passing the query text and the model ID; OpenSearch embeds it and runs the k-NN search.
The value of the pattern is that embedding happens inside OpenSearch on both paths, indexing and query, with the same model. A design that embeds on only one path leaves the other to client code, and the two can drift onto different models.
Connector permissions have two halves
- The connector role (named in the connector's credential): its trust policy must allow the OpenSearch service principal to assume it, and its permissions must allow
bedrock:InvokeModelon the model. Connectors do not use the domain's service-linked role. - The identity creating the connector: it needs
iam:PassRoleon the connector role and, when fine-grained access control is on, a mapping to theml_full_accessrole in OpenSearch.
An authorization error from a connector is fixed in one of these two places: the connector role's trust and permissions, or the creator's right to pass that role.
How do you build a metadata framework for precise retrieval?
A metadata framework attaches typed attributes (date, author, department, product, domain tags) to every document so retrieval can be narrowed with filters or steered towards relevant chunks. For an Amazon Bedrock knowledge base with an S3 data source, attributes come from a metadata sidecar file.
Metadata sidecar files
For reports/q3.pdf, the file must be named reports/q3.pdf.metadata.json: the document's full file name, extension included, plus .metadata.json, stored in the same folder. A file with the wrong name or in another prefix is silently ignored, so filters return nothing even though unfiltered queries work. Each document has one metadata file (up to 10 KB). S3 user-defined object metadata (x-amz-meta-*) and object tags are not ingested as filterable attributes; values such as an object's timestamp or author are useful sources, but they must be written into the sidecar to become attributes. A transformation Lambda can add chunk metadata too, but that is ingestion code to maintain.
{
"metadataAttributes": {
"department": { "value": { "type": "STRING", "stringValue": "oncology" },
"includeForEmbedding": false },
"published": { "value": { "type": "NUMBER", "numberValue": 1757808000 },
"includeForEmbedding": false },
"domains": { "value": { "type": "STRING_LIST",
"stringListValue": ["payments", "fraud"] },
"includeForEmbedding": false }
}
}
Choose types so the filters you need work
Attributes are STRING, NUMBER, BOOLEAN or STRING_LIST. Range operators (greaterThan, greaterThanOrEquals, lessThan, lessThanOrEquals) accept numbers only, so store dates as numeric epoch values when you need date ranges. Documents with several domain tags should use a STRING_LIST and listContains.
| Operator | Tests | Typical use |
|---|---|---|
equals / notEquals | The whole value equals one value | Single-valued attributes such as department or data source ID |
in / notIn | The value is one of a list you supply | Restricting to a set of document IDs or authors |
| Range operators | Numeric comparison | Dates as epoch numbers, versions, scores |
listContains | A STRING_LIST attribute has this member | Multi-tag domain classification |
startsWith / stringContains | Prefix or substring of a string | Loose text matches; supported only on some vector stores and not on managed knowledge bases |
andAll / orAll | Combine filters | Department AND date range |
Filter versus includeForEmbedding
A filter excludes every chunk that fails it. When an attribute should instead make matching chunks rank higher while others stay retrievable, use the full metadata format and set includeForEmbedding to true: the key and value are joined to the chunk text before embedding, but the chunk text returned to the model stays the original wording. The simplified format ("region": "emea") stores the attribute for filtering only.
Implicit metadata filtering
Implicit filtering builds a filter from the user's question automatically. Add implicitFilterConfiguration to the retrieval's vectorSearchConfiguration with a model ARN and a schema that describes each attribute (key, type, description); the model reads the question and the schema and applies a matching filter, with no query parser to write. It differs from query decomposition (which splits questions into sub-queries) and reranking (which reorders results); neither of those filters anything. Because the filter depends on the question's wording, implicit filtering is not a way to enforce a fixed scope.
How do you set up metadata on each vector store?
Give each store the filterable field it needs: a jsonb custom metadata column with a GIN index on Aurora, keyword fields on a self-managed OpenSearch index, the faiss engine on OpenSearch Serverless, and non-filterable Bedrock keys on S3 Vectors. Most filter failures (filters that error, do nothing, or return too few results) come from one of these store-level settings rather than from the filter itself.
| Store | What filters need | Common failure |
|---|---|---|
| Aurora PostgreSQL (pgvector) | Either one typed column per attribute, or one jsonb column named as the custom metadata field with a GIN index on it | Per-attribute columns need an ALTER TABLE for every new attribute |
| Self-managed OpenSearch index | Custom attribute fields mapped as keyword, or as text with a keyword subfield | Filters on a plain text field fail with a "Rewrite first" error |
| OpenSearch Serverless index | A vector index that uses the faiss engine | An nmslib index ignores filters; the engine of an existing field cannot be changed, so create a new faiss index (and a knowledge base on it) and sync |
| S3 Vectors index | AMAZON_BEDROCK_TEXT and AMAZON_BEDROCK_METADATA declared as non-filterable keys when the index is created | Metadata-size errors on sync; non-filterable keys cannot be added later |
Custom attributes belong in the fields above. Each store also has a Bedrock-managed metadata field for the service's own bookkeeping (source attribution and similar), which is not a filterable home for your attributes.
Aurora: selective filters and HNSW
With a pgvector HNSW index, the scan returns a limited candidate list and the filter is applied afterwards. If only a tiny share of chunks match, most candidates are discarded and the request returns fewer results than asked for. Filtering after the scan cannot recover candidates the scan never returned, so the fix is to let the scan continue. From pgvector 0.8, iterative index scans (for example hnsw.iterative_scan = relaxed_order) keep reading the index until enough filtered rows are found; a database-level setting applies to new sessions.
S3 Vectors: small custom metadata
A knowledge base stores the chunk text and its own metadata as vector metadata, which is why those two keys must be non-filterable. Custom metadata per vector is small (about 1 KB and 35 keys with a knowledge base), so long text such as an abstract does not belong in metadata files; store it elsewhere and keep attributes short.
How do you keep vector search fast at scale in OpenSearch?
Fast vector search at scale comes from right-sized primary shards (work per query), enough replicas on enough nodes (queries in parallel), and k-NN graphs that fit in native memory, compressed if necessary.
Shards and replicas
- AWS recommends roughly 10–30 GiB per shard for latency-sensitive search. Oversized shards make each query slow even when CPU and memory have headroom.
number_of_shardsis set when an index is created (the_splitand_shrinkAPIs exist but require blocking writes to the index). To change it on a live index, create a new index with the right number of primaries, reindex into it, and switch an index alias so the application's query code is unchanged.- Replicas serve reads, so adding data nodes and replicas raises how many queries the domain handles at once. Replicas do not shrink a shard, so they do not fix single-query latency, and more replicas on the same nodes add little capacity.
- Longer
refresh_intervaland force merges mainly help indexing; time-based indexes suit logs, not semantic corpora.
k-NN graph memory
HNSW graphs (Faiss or nmslib engines) live in native memory outside the JVM heap. OpenSearch Service gives the heap half of a node's RAM (up to 32 GiB), and by default the k-NN circuit breaker allows graphs to use 50% of the remaining memory. When KNNGraphMemoryUsage hits the limit, graphs are evicted and latency spikes.
To size a domain, estimate graph memory per vector with the HNSW formula 1.1 × (4 × dimensions + 8 × m) bytes, multiply by the vector count, then multiply by the number of copies (primary plus every replica). For example, 20 million 768-dimension vectors with m = 16 need about 3.5 KB each, roughly 66 GiB per copy and 131 GiB with one replica. A 32 GiB node offers (32 − 16) × 50% = 8 GiB of graph memory, so 17 nodes; a 64 GiB node offers 16 GiB, so 9.
| Symptom | Fix | Principle behind it |
|---|---|---|
| Graph memory at the limit, hardware fixed | Reindex into a knn_vector field with mode: on_disk (compression, 32x by default) and keep rescoring, which re-ranks candidates with full-precision vectors from disk; small latency cost, recall stays high | Graphs live off-heap and every copy holds its own, so graph capacity comes from smaller vectors or more node memory, while the rest of memory must stay free for the OS and file cache |
| Slow first queries after a new index goes live | Call the k-NN warmup API before moving the alias; graphs otherwise load lazily on first search | Graphs load lazily on first search; preloading moves that cost ahead of traffic |
| Initial bulk load too slow | For the load only, set refresh_interval to -1 and number_of_replicas to 0, then restore both before serving | Each refresh creates segments whose graphs are built and later merged, and every replica repeats all indexing work |
Replicas add read throughput, never per-query capacity or indexing speed: adding a replica after the load copies finished segments instead of re-indexing every document.
When should you use multiple indexes or hierarchical indexing?
Use one index per specialised domain when domains differ in embedding model, vector dimension, mapping, scale or update schedule, and route each question to the right index; use a two-tier hierarchical index when a huge corpus makes a flat chunk search slow and imprecise.
Multi-index versus one shared index
| Situation | Better design |
|---|---|
Domains use different models or dimensions (one knn_vector field has one dimension), or need their own shards and refresh schedules | One index per domain, a classifier that routes each question to that domain's index alias, and independent rebuilds per domain |
| Same model and chunking, small volumes, many questions span domains | One index with a domain keyword field; filter on it when a question targets one domain, search everything when it spans domains |
Routing is what keeps each search small: a question should touch only the vectors that can answer it, and every extra cluster, pipeline or knowledge base is one more thing to run and sync.
Hierarchical (two-tier) indexing
When questions concern a few documents in a corpus of millions, first search a document-level index of summary embeddings to pick the top documents, then run the chunk search filtered to those document IDs (for example an in filter on a report_id attribute). The first tier is small, so it is fast; the second searches only relevant chunks.
The document scope must be applied inside the second search: post-filtering cannot recover candidates the nearest-neighbour search never returned, so it can return too few results and does no less work. Bedrock's hierarchical chunking (Task 1.5) is a different idea: it returns a larger parent chunk for a matched child chunk, not a whole document, and a data source's chunking strategy cannot be changed after the data source is created.
How do you connect wikis and document systems to a knowledge base?
Connect sources through a knowledge base's data source connectors where one exists, and through a Custom data source with the direct ingestion APIs where it does not. Writing vectors straight into the index behind a knowledge base is never the integration path: it skips Bedrock's parsing, chunking and the fields it manages for each chunk, so the knowledge base cannot track, update or delete those entries.
Managed knowledge bases and native connectors
A Bedrock Managed Knowledge Base offers native connectors for Amazon S3, SharePoint, Confluence, Web Crawler, Google Drive, OneDrive and Custom sources, plus ACL-aware connectors such as ServiceNow, Box, Zendesk and Salesforce. Bedrock crawls, parses, embeds, stores and retrieves, so there is no vector store to operate. Since 30 September 2026, new Confluence, SharePoint, Salesforce and Web Crawler connectors cannot be created on customer-managed knowledge bases (existing ones keep working); for a new project on those sources, a managed knowledge base is the low-overhead path.
Custom data sources for everything else
A homegrown wiki, a content management system or a DynamoDB table usually has no connector but can emit change events. Attach a Custom data source and push changes:
IngestKnowledgeBaseDocumentsadds or replaces a document (keyed by your own document ID) within moments.DeleteKnowledgeBaseDocumentsremoves it; without this path, deleted pages keep appearing in answers.- A webhook can reach a Lambda function through API Gateway. For DynamoDB, enable Streams with the
NEW_IMAGEview (the record carries the new item, and every record carries the key) and handleINSERT/MODIFYwith ingest andREMOVEwith delete.KEYS_ONLYwould force a read back for every change. - A Custom data source is not synced with ingestion jobs;
StartIngestionJobdoes not apply its changes.
Starting a sync job for every event is the wrong tool for near-real-time changes: jobs take minutes, and a second job cannot start while one is running (one per knowledge base), so further calls are rejected rather than queued.
How do you enforce per-user and per-tenant access in retrieval?
Enforce document access inside retrieval itself, either with ACL-aware retrieval on a managed knowledge base or with a server-set metadata filter whose value comes from an identity the user cannot change. IAM, guardrails and bucket policies cannot do document-level access control on retrieval.
ACL-aware retrieval
On a Bedrock Managed Knowledge Base, ACL awareness on a supported connector ingests the source's per-user and per-group permissions. Your application passes the authenticated user's email as user context on each retrieval, and results are filtered to what that user may open. For SharePoint, access is also checked in real time, so a permission removed since the last sync is honoured. Copying allowed groups into your own metadata files works only until permissions change between syncs.
Multi-tenant filters
For many tenants on one customer-managed knowledge base, tag each document with a tenant_id attribute and have the backend add an equals filter from a trusted identity value, for example a signed token claim. The value must also be one the user cannot edit: in Amazon Cognito, make the tenant attribute read-only for the app client, because users can update any custom attribute their app client may write. One knowledge base per tenant isolates too, but hundreds of knowledge bases, data sources and syncs add heavy operations and run into quotas.
Scoping to one data source
Every chunk carries reserved metadata you can filter on without custom attributes. Managed knowledge bases use underscore-prefixed names such as _data_source_id and _source_uri; customer-managed knowledge bases use the x-amz-bedrock-kb-* prefix (for example x-amz-bedrock-kb-data-source-id). Remember that managed knowledge bases do not support startsWith or stringContains, so scope with equals.
| Control | What it actually limits |
|---|---|
IAM on bedrock:Retrieve | Who can query a knowledge base, not which documents inside it they see |
| S3 bucket policy on source files | Nothing at retrieval time; Retrieve reads the vector store with the knowledge base's role |
| Bedrock Guardrails denied topics | Content categories in prompts and answers, with no knowledge of document permissions |
How do you keep a vector store current and accurate?
Keep vectors current with incremental syncs triggered by change events or schedules, push urgent single-document changes through direct ingestion, and control deletions explicitly with the data deletion policy and deletion protection.
Syncs are incremental
StartIngestionJob processes only documents added, modified or deleted since the last sync, so the cost of a daily sync scales with the changes. When only metadata files change (non-CSV content and no transformation Lambda), the sync merges the new metadata into existing vectors without calling the embedding model.
Event-driven and scheduled refresh
- Real-time change detection: turn on Amazon EventBridge notifications for the S3 bucket (object created and deleted events, no polling). An EventBridge rule starts a Step Functions workflow that waits briefly to collect a burst, calls
StartIngestionJobonce and tracks it withGetIngestionJob. Starting one sync per object does not work: only one ingestion job can run per knowledge base (and per data source) at a time, so calls made while a job is running are rejected and the burst is not reliably picked up. - Scheduled refresh: managed knowledge base data sources have a built-in sync schedule (daily, weekly on a chosen day, or monthly on a day number). On customer-managed knowledge bases, use EventBridge Scheduler to call
StartIngestionJob. Pick the cadence that matches when content is approved, not just how often it changes.
Direct ingestion on an S3 data source
Calling IngestKnowledgeBaseDocuments on an S3 data source updates the knowledge base quickly but does not change the bucket. The next sync treats S3 as the source of truth and re-indexes the old file, so every direct fix must also be written to S3. AWS advises against running direct ingestion and a sync at the same time.
Deleting safely
| Setting | When it acts | Behaviour |
|---|---|---|
dataDeletionPolicy on a data source | When the data source or the knowledge base is deleted | DELETE removes the data source's vectors from the store; RETAIN leaves them (useful when another application reads the same index). Changeable with UpdateDataSource; managed knowledge bases support DELETE only |
| Deletion protection on a managed connector | During a sync | If a sync would delete more than a threshold percentage of documents, its delete phase is skipped and the index stays as it was (guards against a bad crawl after a permission change). Not available for Custom data sources |
The order matters: if vectors must be erased, switch the policy to DELETE before deleting the data source. After a RETAIN deletion, the vectors belong to no data source, so no later sync or source-file deletion will remove them.
Tip. Task 1.4 questions describe a company's GenAI application in production with several requirements at once, such as no ingestion code, results within a minute, least operational overhead, lowest embedding cost or no schema changes, and ask for the design or fix that meets all of them. The options are real AWS mechanisms, so you need to know what each one actually does and when it acts. Expect store-specific details (metadata file naming, attribute types and operators, OpenSearch mappings and engines, Aurora indexes, S3 Vectors keys), OpenSearch sizing arithmetic, and the current split between managed and customer-managed knowledge bases. Several questions ask for TWO answers, each a separate half of the solution.
- pgvector in Aurora PostgreSQL when similarity must join relational metadata; DynamoDB pairs with a vector store via zero-ETL; S3 Vectors for huge, rarely queried sets, with hot indexes exported to OpenSearch Serverless.
- OpenSearch embeds for you with a Bedrock connector, a text_embedding ingest pipeline and neural queries; the connector role must trust OpenSearch, and its creator needs iam:PassRole (plus ml_full_access with fine-grained access control).
- A metadata file is named <file>.<ext>.metadata.json and sits beside the document; S3 object metadata and tags are not ingested as attributes.
- Range filters need NUMBER attributes (epoch dates); multi-tag domains need STRING_LIST with listContains; includeForEmbedding steers ranking while a filter excludes.
- Store-specific filter setup: JSONB custom metadata column with a GIN index on Aurora, keyword fields on self-managed OpenSearch, faiss on OpenSearch Serverless, non-filterable AMAZON_BEDROCK_TEXT/METADATA keys at S3 Vectors index creation.
- Primary shards (about 10–30 GiB each) set per-query work and are fixed at creation, so reindex behind an alias; replicas on more nodes add throughput.
- k-NN graphs are off-heap: size for every copy, use on_disk mode with rescoring under memory pressure, warm up new indexes, and bulk-load with refresh off and zero replicas.
- Systems without a connector use a Custom data source with Ingest/DeleteKnowledgeBaseDocuments; new Confluence, SharePoint, Salesforce and Web Crawler connectors need a managed knowledge base.
- Syncs are incremental, metadata-only changes skip re-embedding, and direct fixes on an S3 data source must also be written to S3.
- dataDeletionPolicy acts when a data source or knowledge base is deleted; deletion protection acts during a managed-connector sync.
Frequently asked questions
Why do my Bedrock knowledge base metadata filters return nothing?
The most common cause is a metadata file that the S3 connector never associated with its document. The file must be named after the document's full file name, extension included, with .metadata.json appended (for example manual.docx.metadata.json), and it must sit in the same folder as the document. Other causes are store-specific: a self-managed OpenSearch field mapped as plain text instead of keyword, or an OpenSearch Serverless index built on the nmslib engine instead of faiss.
How do I filter a Bedrock knowledge base by date?
Store the date as a NUMBER attribute, typically Unix epoch seconds, in each document's metadata file, then use greaterThan, lessThan or the other range operators. Range operators accept numbers only, so a date stored as a string cannot be range-filtered, and prefix or substring matches cannot express a cut-off date.
What does includeForEmbedding do in a knowledge base metadata file?
When includeForEmbedding is true for an attribute, Amazon Bedrock joins the attribute's key and value to the chunk text before creating the embedding, so queries that mention that value rank those chunks higher. The chunk text returned to the model stays the original content, and no chunks are excluded. Use a filter instead when results must be restricted.
When should I use Amazon S3 Vectors instead of OpenSearch for a knowledge base?
Use S3 Vectors for very large vector sets that are queried infrequently, where sub-second latency is acceptable and you want pay-per-use storage with no clusters or capacity to manage. Use OpenSearch for low-latency, high-throughput search. The two combine: keep the archive in S3 Vectors and export a hot vector index to OpenSearch Serverless as a point-in-time copy.
How many OpenSearch data nodes do I need for my vector index?
Estimate native graph memory per vector (for HNSW, about 1.1 x (4 x dimensions + 8 x m) bytes), multiply by the vector count and by the number of copies, primary plus replicas. Each node gives half its RAM, up to 32 GiB, to the JVM heap, and by default k-NN graphs may use 50% of the rest. Divide the total graph memory by that per-node budget and round up.
How do I sync a wiki that has no Bedrock connector into a knowledge base?
Add a Custom data source to the knowledge base and push changes from the wiki's webhooks or change events, usually through API Gateway and a Lambda function. Call IngestKnowledgeBaseDocuments for created or edited pages and DeleteKnowledgeBaseDocuments for deleted ones. Changes are retrievable within moments, and a Custom data source is not synced with ingestion jobs.
Does re-syncing a Bedrock knowledge base re-embed every document?
No. StartIngestionJob is incremental and processes only documents added, modified or deleted since the last sync. If only metadata files changed, for non-CSV content and with no transformation Lambda attached, the sync updates the metadata on existing vectors without calling the embedding model at all.
What is the difference between a data deletion policy and deletion protection in Bedrock knowledge bases?
The data deletion policy (DELETE or RETAIN) decides what happens to a data source's vectors when the data source or the whole knowledge base is deleted, and it can be changed with UpdateDataSource. Deletion protection applies to managed-connector syncs: if a sync would delete more than a set percentage of documents, it skips the delete phase and leaves the index as it was.
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.