Strands Agents (the open-source Python and TypeScript agent SDK) paired with Amazon Bedrock AgentCore Gateway has rapidly become the default blueprint for AWS-native engineering teams moving agents from prototype to production. Strands simplifies model-driven tool loops, while AgentCore provides managed session isolation, workload identity, stateless MCP 2026-07-28 routing, Lambda interceptors, and Cedar-based authorization.
Yet the moment an enterprise rolls Strands agents beyond a single AWS account — adding direct Anthropic or OpenAI models, external SaaS MCP servers, coding agents on developer laptops, or multi-agent A2A workflows — AWS-only controls stop at the AWS boundary. This guide lays out a complete, defense-in-depth security architecture for Strands Agents and AgentCore Gateway.
The 4-Layer Security Architecture for Strands Agents
Layer 1: Isolate Code & Tool Execution (Sandboxing)
Strands agents can execute code, browse data, and chain arbitrary tool invocations dynamically. Never run an autonomous Strands loop directly inside a host or container with broad IAM instance credentials or writable root filesystems:
- Sandbox untrusted execution: Isolate shell, file, and code-interpreter tools inside dedicated microVMs or sandboxed runtimes (such as Strands Box or ephemeral AgentCore Runtime sessions) with no access to host secrets or IMDSv1 metadata endpoints.
- Lock down local tool parameters: Validate file paths against an explicit temporary directory allow-list, reject shell interpolation, and return structured errors instead of raw stack traces that leak internal paths to the LLM.
Layer 2: Narrow Tool Catalogs & Interceptors at AgentCore Gateway
Inside AWS, AgentCore Gateway removes static credentials from agent code and routes MCP requests cleanly across stateless HTTP infrastructure:
- Scope every MCP tool catalog per caller role: Use gateway interceptors and Cedar policies to filter
tools/listso a read-only triage agent never even sees destructive write tools in its context window. - Bind execution to user + workload identity: Avoid shared IAM roles across multiple agents. Ensure every AgentCore workload carries a distinct identity so CloudTrail and audit logs distinguish a Finance Invoice Agent from a Support Triage Agent.
- Pin tool definitions against drift: Treat third-party MCP tool descriptions as untrusted code — apply SHA-256 baseline pinning and human review before new or modified tools reach Strands agents (see OWASP MCP Top 10 defense guide).
Layer 3: Govern Cross-Cloud Models, SaaS MCPs & Spend Caps
In practice, most enterprise teams running Strands Agents do not stay 100% inside Amazon Bedrock:
- Engineers route specific reasoning tasks to direct Anthropic or OpenAI endpoints alongside Bedrock models.
- Agents connect to external SaaS MCP servers (GitHub, Linear, Jira, Slack, HubSpot, Snowflake) and collaborate with non-AWS agents built in LangGraph, Google ADK, or CrewAI.
- Finance and security teams need one organization-wide spend cap, one emergency kill switch, and one policy language across AWS and non-AWS traffic.
# Illustrative pattern: route a Strands agent's OpenAI-compatible model client
# through a governed BYOK model gateway for spend caps, guardrails & audit proof.
import os
from strands import Agent
from strands.models.openai import OpenAIModel
model = OpenAIModel(
client_args={
"api_key": os.environ["PRAESIDIA_API_KEY"],
"base_url": "https://router.praesidia.ai/openai/v1",
},
model_id="gpt-4.1-mini",
)
agent = Agent(
model=model,
system_prompt="Summarize approved ticket metadata. Never request raw credentials.",
)
Routing external model calls through the Praesidia model gateway quickstart keeps your upstream provider keys encrypted server-side, enforces hard monthly spend caps before a runaway Strands loop drains your budget, and applies bidirectional guardrails (such as PII redaction and prompt-injection checks) consistently across every model provider.
Layer 4: Multi-Cloud Inventory, Blast Radius & Offline Audit Proof
Compare what stays inside AWS vs what a cross-cloud control plane adds:
| Security Control | AWS-Native (IAM + AgentCore + Cedar) | Unified Control Plane (Praesidia) |
|---|---|---|
| Bedrock / AWS-internal MCP auth | Native IAM, Cedar policies, Lambda interceptors | Complements AWS IAM across external/multi-cloud routes |
| Multi-provider BYOK spend caps | Separate billing/quotas per external provider | Single hard spend cap across OpenAI, Anthropic, Gemini, Bedrock & more |
| Cross-cloud AI system graph & AIBOM | Scoped to AWS accounts | One AI system graph & signed CycloneDX AIBOM across AWS, SaaS MCPs & laptops |
| Human step-up approvals across tools | Custom workflow plumbing per tool | Built-in held-call approval workflows across MCP & agent connections |
| One-step org-wide emergency freeze | Account-by-account IAM/SCP changes | Single preview-and-freeze across governed agents, models & MCP connections |
| Offline-verifiable audit evidence | CloudWatch / CloudTrail logs (AWS-bound) | Signed, hash-chained decision records verifiable offline without vendor servers |
Common Security Pitfalls in Strands Deployments
- Passing broad AWS IAM policies to tool Lambdas: Even if Cedar gates the MCP entry point, an overly permissive Lambda execution role turns any argument-injection bug (
MCP05) into lateral cloud access. Scope each tool's IAM role to a single resource ARN. - Ignoring indirect prompt injection in RAG / ticket tools (
MCP06): Strands agents reading Confluence pages, S3 documents, or customer emails can be steered into calling a write tool. Require human approval on mutating tools and enforce read-then-send sequence rules. - Forgetting developer coding agents: Securing production Strands pods while leaving developers' local Claude Code and Cursor
mcp.jsonfiles unmonitored leaves the easiest credential-theft vector open. Scan local configs with the MCP config security checker. - Treating CloudTrail alone as EU AI Act evidence: CloudTrail logs AWS API calls, not model prompt-guardrail verdicts, human step-up approvals, or AIBOM version diffs. Map your full evidence duties with the EU AI Act agent risk classifier and AWS Bedrock AgentCore identity guide.
How Praesidia Complements Strands Agents
Praesidia slots in cleanly alongside AWS Strands and AgentCore whenever your agents span multiple model providers, external MCP servers, or regulated workflows:
- Discover & Map: Group Strands agents, Bedrock/OpenAI/Anthropic models, MCP servers, and data sources into one AI system graph with blast-radius analysis.
- Secure Inline: Enforce per-connection MCP tool allow-lists, bidirectional guardrails, hard spend caps, and human step-up approvals on calls routed through the MCP gateway and AI Model Gateway.
- Prove Offline: Praesidia records the decisions it makes on traffic routed through it in an append-only, hash-chained audit trail with offline verification — ready for SOC 2 Type II and EU AI Act reviews.
Common questions
Do I still need an AI agent control plane if I use Amazon Bedrock AgentCore Gateway? If 100% of your agents, models, tools, and developer workflows stay inside a single AWS account and you only need CloudTrail logging, AgentCore primitives cover a lot of ground. You need a cross-cloud control plane when Strands agents call non-AWS models or SaaS MCP servers, when you also govern coding agents or multi-framework fleets (LangGraph, Google ADK, CrewAI), or when auditors require signed CycloneDX AIBOMs and offline-verifiable decision records.
How should I prevent a runaway Strands agent loop from causing an unexpected model bill? Set max-iteration limits inside your Strands agent configuration AND enforce a hard external budget cap at the model gateway layer. Application-level loop counters can be bypassed by retries or concurrent workers; a gateway budget cap refuses excess calls deterministically. Estimate runaway loop exposure with our AI agent cost calculator.
How does MCP 2026-07-28 affect securing Strands MCP connections? The stateless Streamable HTTP model scales horizontally without sticky sessions, which means every single HTTP MCP request must carry and validate its own short-lived, audience-bound credentials (OAuth 2.1 + RFC 8707 resource indicators) rather than relying on connection-level trust.
Can Praesidia govern Strands agents without rewriting our tool code? Yes. Point Strands' OpenAI- or Anthropic-compatible model client at Praesidia's AI Model Gateway and register external MCP servers behind Praesidia's MCP gateway. Start in observe mode to baseline calls before enabling enforcement.