Keeping Knowledge Bases Current and Re-Indexing Safely
This lesson explains knowledge base refresh cycles that keep vectors in step with source documents, and the planned re-index that larger changes such as a new embedding model require.
Learning outcomes
After completing this lesson, you will be able to:
- Use incremental sync.
- Orchestrate refresh cycles by schedule and events.
- Re-index fully with a blue/green approach.
Incremental sync
A knowledge base ingestion job started with StartIngestionJob compares the data source with what was indexed and processes only added, modified and deleted documents, which keeps cost and time low. Custom data sources can push changes directly with IngestKnowledgeBaseDocuments and DeleteKnowledgeBaseDocuments for near-real-time updates without a full sync.
The following diagram shows an event-driven cycle that keeps a news assistant's knowledge base within 15 minutes of publication.

Orchestrating refresh cycles
Common triggers are a schedule (EventBridge Scheduler starting a sync nightly), events (S3 object-created and object-removed events routed through EventBridge to a Lambda function or Step Functions workflow that starts a sync, batching events to avoid excessive jobs) and upstream pipelines (a document-processing workflow that ends by syncing). Step Functions can poll GetIngestionJob until completion, check failure counts and alert through SNS.
Keep it current
Full re-indexing
Changing the embedding model, vector dimensions, vector store or chunking strategy invalidates existing vectors. Use a blue/green approach: create a new knowledge base or data source with the new configuration, ingest everything, run RAG evaluations against the old one, then switch the application's knowledge base ID and delete the old index. The following table summarises refresh options.
| Change | Refresh method |
|---|---|
| Documents added, edited or deleted | Incremental ingestion job (sync) |
| Near-real-time updates from an application | Direct document ingestion APIs |
| New embedding model or dimensions | New knowledge base, full ingestion, evaluate, switch |
| New chunking or parsing strategy | New data source, full ingestion, evaluate, switch |
Re-index without downtime
A news assistant
A media company's assistant must answer from articles within 15 minutes of publication, and corrected articles must replace old versions.
- The publishing system writes articles to S3; EventBridge rules match object-created and object-deleted events.
- A Lambda function batches events for five minutes, then starts an ingestion job if none is running.
- A Step Functions workflow waits for completion and alerts on failed documents.
Updates land within the 15-minute target, and corrections replace earlier versions because modified objects are re-ingested. A nightly sync alone would leave the assistant up to a day out of date.
How are documents deleted from S3 removed from a knowledge base?
Show answer
The next sync removes them.
Exam Tips
Remember for the exam
- Keep indexes current: incremental ingestion jobs on a schedule or on S3 events.
- Deleted documents are removed by the next sync.
- Near-real-time updates: direct document ingestion APIs.
- New embedding model or chunking: build a new index, evaluate, then switch (blue/green).
- Orchestrate and monitor syncs with EventBridge and Step Functions.