Connect Amazon Bedrock AgentCore to cross-account knowledge bases
AWS ML Blog · rss · 2026-08-26
This post explains how to connect Amazon Bedrock AgentCore agents to knowledge bases hosted in separate AWS accounts (backed by Amazon Redshift Serverless), maintaining workload boundaries without copying data.
The Challenge:
Bedrock Knowledge Bases resource policies support cross-account Retrieve but not RetrieveAndGenerate. The solution assumes a narrowly scoped IAM role in the target account to bridge this gap.
Solution Overview:
Two implementation variants are provided, sharing the same data access boundary:
- Code-based Strands Agent: Runs on AgentCore Runtime with tools in a local Model Context Protocol (MCP) subprocess.
- Declarative AgentCore Harness: Uses a managed loop via AgentCore Gateway calling an AWS Lambda tool.
Request Flow:
User query -> Amazon Nova Pro selects tool -> Tool assumes cross-account role via AWS STS -> Calls RetrieveAndGenerate (Claude Haiku) against Redshift -> Returns answer.
Decision Matrix:
- Strands Agent: Best for teams needing custom orchestration, hooks, middleware, or direct control.
- Harness: Best for teams preferring a managed, configuration-first lifecycle.
A linked GitHub repository provides deployment procedures and a sample Streamlit client.
More from coding & agent
- Optimizing inference on 4090: sub-10ms latency achieved — yacineMTB · 2026-08-27
- Tutorial request: Bulk downloading songs with AI agents and auto-tagging — EnvironmentalTry8353 · 2026-08-27
- Google AI Studio enables two-way GitHub sync with direct commits and one-click deploy — jackwoth · 2026-08-27
- Opinion: Notification systems need rebuilding for agent-primary usage and context linking — andreisavu · 2026-08-27
- OpusClip and Beehiiv integrate to auto-turn videos into newsletters via Claude — azed_ai · 2026-08-27
- Bixbench3: Frontier Agents Score Below 50% in Reproducing Paper Analysis — xeophon · 2026-08-27