Skip to content

GetKnowledgeBaseDocuments

Source: src/AWS/Bedrock/GetKnowledgeBaseDocuments.ts

Runtime binding for bedrock-agent:GetKnowledgeBaseDocuments — read the ingestion status of specific documents in the bound DataSource.

The binding grants the function bedrock:GetKnowledgeBaseDocuments scoped to the data source’s parent knowledge base.

// init
const getDocuments = yield* Bedrock.GetKnowledgeBaseDocuments(dataSource);
// runtime
const { documentDetails } = yield* getDocuments({
documentIdentifiers: [
{ dataSourceType: "CUSTOM", custom: { id: "welcome-doc" } },
],
});
const status = documentDetails?.[0]?.status; // e.g. "INDEXED"