ReadonlydescriptionDescription of the Retrieve tool as the model sees it. Say what the knowledge base contains and
when to search it; the model uses this to decide when to call the tool.
Use cases: steering tool selection when a gateway exposes several knowledge bases or tools
AWS: AWS::BedrockAgentCore::GatewayTarget ToolDefinition Description
Validation: Required; non-empty String
ReadonlyidKnowledge base the connector queries. config:<name> references a knowledge base in this
module's knowledgeBases map and resolves to the deployed knowledge base. Otherwise, the id of an
existing knowledge base in the same account and region, as a literal or an ssm: reference.
Use cases: querying a knowledge base built by this module; querying one built by another module
AWS: bedrock-agent-runtime Retrieve knowledgeBaseId; scopes the connector's bedrock:Retrieve grant
Validation: Required; config:<name> naming a key in knowledgeBases, an ssm: reference, or a
10-character alphanumeric knowledge base id (not an ARN or knowledge base name)
Optional ReadonlynetworkVPC placement of the connector Lambda, through a set in the module's vpcEndpoints map. Omit to run
the connector outside your VPC.
Use cases: VPC-bound Lambda policies; data perimeter policies on bedrock:Retrieve
AWS: AWS::Lambda::Function VpcConfig
Validation: Optional; GatewayKnowledgeBaseNetworkProperty
Optional ReadonlynumberNumber of results each query retrieves. Omit to use the Retrieve service default.
Use cases: trading answer grounding against response size
AWS: bedrock-agent-runtime Retrieve vectorSearchConfiguration.numberOfResults
Validation: Optional; integer 1-100
Optional ReadonlyoverrideSearch type each query requests. Omit to let the knowledge base choose.
Use cases: forcing keyword-plus-vector search, or vector-only search
AWS: bedrock-agent-runtime Retrieve vectorSearchConfiguration.overrideSearchType
Validation: Optional; HYBRID | SEMANTIC
Knowledge base tool source for a gateway target. bedrock-builder generates a Lambda connector that calls
bedrock-agent-runtime:Retrieveagainst this knowledge base and registers it as a Lambda target exposing oneRetrievetool, with the same input and output shape as the native managed-knowledge-base connector'sRetrievetool.Use cases: RAG over a customer-managed knowledge base from a harness or any MCP client of the gateway
AWS: AWS::Lambda::Function (connector) + AWS::BedrockAgentCore::GatewayTarget (Lambda target)
Validation: id and description are required