Skip to content

Amazon: Support managed Bedrock knowledge bases - #72608

Open
Kunal8954 wants to merge 5 commits into
apache:mainfrom
Kunal8954:agents/github-issue-solution-pr-creation
Open

Kunal8954 wants to merge 5 commits into
apache:mainfrom
Kunal8954:agents/github-issue-solution-pr-creation

Conversation

@Kunal8954

Copy link
Copy Markdown
Contributor

Support creating Amazon Bedrock managed knowledge bases with BedrockCreateKnowledgeBaseOperator.

Managed knowledge bases do not require a user-configured vector store or vector index. The operator now accepts a custom knowledge-base configuration, omits storage configuration when it is not provided, preserves the existing self-managed VECTOR behavior, and skips vector-index retry handling for managed knowledge bases. Documentation and unit tests cover both direct configuration and create_knowledge_base_kwargs.

closes: #72592


Was generative AI tooling used to co-author this PR?
  • Yes — Copilot (GPT-5)

Generated-by: Copilot (GPT-5) following the guidelines

Managed knowledge bases do not require a user-configured vector store, so the operator must accept their configuration and avoid self-managed index retries.

Co-authored-by: Copilot <[email protected]>
@Kunal8954
Kunal8954 requested a review from vincbeck September 13, 2026 11:51
Append the new knowledge_base_configuration parameter after all existing
parameters so the operator's public signature stays compatible and add a
regression test proving existing self-managed Dags still produce the same
CreateKnowledgeBase call.
@Kunal8954

Kunal8954 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

@vincbeck — I've pushed updates addressing the backward-compatibility concern you raised, could you take another look?
If it looks good, please merge the PR. Thanks!

Comment on lines +772 to +773
if self.role_arn is None:
raise ValueError("`role_arn` must be specified to create a knowledge base.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why marking role_arn as optional parameter in its definition but not allowing it in the execution?

@o-nikolas o-nikolas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazon provider pins botocore>=1.42.79 but support for this only arrived in botocore 1.43.32 so you will get some runtime errors from folks using the older version of botocore

role_arn="arn:aws:iam::123456789012:role/BedrockExecutionRole",
knowledge_base_configuration={
"type": "MANAGED",
"managedKnowledgeBaseConfiguration": {"embeddingModeType": "MANAGED"},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

embeddingModeType Is a typo right? should Model not Mode?


.. code-block:: python

BedrockCreateKnowledgeBaseOperator(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not worth updating the system test and using example include?

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Nov 14, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers kind:documentation provider:amazon AWS/Amazon - related issues stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Managed Knowledge Bases in BedrockCreateKnowledgeBaseOperator

3 participants