Skip to content Skip to footer

How to Use Elasticsearch S3 Federation in RAG Without Replacing Your Search Index

What Happened

Elasticsearch ES|QL Data Federation can query Parquet, CSV, TSV, and NDJSON files in Amazon S3 through a registered dataset and the same FROM clause used for indices. It reads files without first copying them into Elasticsearch; Parquet queries can read only the columns needed. Datasets can also be used in views and Agent Builder [1][2].

This is an emerging capability, not a general replacement for indexed retrieval. In Elasticsearch 9.5 it is experimental and must be enabled explicitly. The 9.6 release was described as a forthcoming technical preview at the time of these reports; availability and deployment requirements should be checked before adoption. Enterprise subscription requirements apply [1][2].

Why It Matters to Businesses

For retrieval-augmented generation (RAG), federation offers a way to inspect or correlate information in S3 without maintaining a second copy solely for occasional queries. That can help with audits, investigations, and exploratory analytics. It does not mean an application can treat S3 files as a drop-in vector database: federated kNN is unavailable in 9.5, while 9.6 supports only exact vector search on federated data [1].

Teams using LlamaIndex, LangChain, or Haystack should therefore keep a distinction between orchestration and retrieval. A framework can call several tools, but it does not remove the latency, access-control, or relevance differences between querying S3 files and searching an indexed corpus.

Kimbodo Engineering Perspective

We would use federation for cold or changing analytical data and index the high-value subset that needs predictable, frequent retrieval. For semantic or hybrid search, the choice among Elasticsearch, Weaviate, Pinecone, Qdrant, Milvus, or Vespa should still be driven by relevance tests, filtering needs, operational constraints, and cost—not by the presence of an S3 connector. The reported federation limits make that separation particularly important [1][2].

How We Would Implement It

  • Classify queries first: route exploratory ES|QL questions to registered S3 datasets; route production RAG retrieval to an indexed search service. Measure both paths against representative questions.
  • Register an S3 data source, then datasets for specific file layouts. Use Parquet where column selection and time-filter pushdown can reduce reads; define timestamp mappings and partitions where useful [1][2].
  • Keep orchestration explicit: expose each retrieval path as a separate application tool, return source identifiers with results, and require the answer-generation step to cite the material it used.
  • Promote repeatedly accessed or latency-sensitive subsets into an index. Test correlation with indexed data using the supported ES|QL mechanisms rather than assuming every indexed operation works on federated datasets [1][2].

Risks, Costs and Security

Federated datasets lack document- and field-level security, and remote cross-cluster search is unsupported. Do not expose a dataset to users who should see only selected rows or fields; enforce authorization before tool execution or create appropriately separated datasets [1].

Prefer an AWS OIDC role scoped to the required bucket and object prefix where the deployment supports it, and verify that the IAM prefix matches the registered file paths. Account for S3 requests, scanned data, Elasticsearch subscription charges, and variable query latency. Because federation remains experimental or in preview in the cited versions, validate feature availability and production suitability with Elastic before making it a critical dependency [1][2].

Where Kimbodo Comes In

Kimbodo builds and operates this in production for businesses — see our RAG Development Services practice, or Estimate My RAG System.

Sources

  1. [1] No pipeline, no second copy: Querying Amazon S3 from Elasticsearch with ES|QL
  2. [2] How to query Amazon S3 from Elasticsearch with ES|QL, no ingest required

Leave a comment

0.0/5

Engineering Founded & Customer Focused

KIMBODO LLC. © 2026. All Rights Reserved.