In the second installment the architecture moves from a matrix of agents calling individual Model Context Protocol (MCP) servers to a single AgentCore Gateway that acts as the front door for every tool request. Practitioners care because the new pattern eliminates a sprawling credential surface, centralizes authorization logic, and provides a single observability point for compliance and debugging.
Architecture Shift
The gateway stores a registry of all MCP endpoints and evaluates Cedar policies before any request reaches a tool. Agents no longer need direct ARNs for each server, and their IAM role drops token‑exchange and secret‑read permissions. A second agent running on Amazon EKS demonstrates that the gateway is agnostic to the agent’s runtime environment. Observability is added through AgentCore’s OpenTelemetry integration, feeding CloudWatch Transaction Search, while Okta’s System Log is streamed into CloudWatch via EventBridge.
Implementation Flow
- The user authenticates with Okta; the backend‑for‑frontend (BFF) swaps the ID token for an Identity Assertion JWT Authorization Grant (ID‑JAG) addressed to the task agent.
- The BFF invokes the task agent on the Bedrock AgentCore runtime, passing the ID‑JAG.
- The agent forwards the ID‑JAG as a bearer token to its dedicated Gateway endpoint. The Gateway’s inbound authorizer accepts only ID‑JAGs issued for that agent.
- Before routing, the Gateway evaluates Cedar policies that bind each tool to the agent and to the scope delegated by Okta.
- If the policy permits, the Gateway uses AgentCore Identity to redeem the ID‑JAG for a target‑specific token at Okta’s custom authorization server. Denied calls never trigger a redemption.
- The MCP server receives the request, checks the user’s groups and scope as before, and records an
authz.checkspan. - Each hop emits OpenTelemetry spans; CloudWatch aggregates them, and Okta logs are ingested via EventBridge for a complete audit trail.
Operational and Security Implications
- Reduced credential blast radius: Agents no longer hold token‑exchange rights for every downstream tool, limiting the impact of a compromised role.
- Single source of policy truth: Cedar policies live only in the Gateway, eliminating drift across thousands of MCP servers.
- Scalable topology: Adding new tools or agents requires only a registry entry, not a re‑wire of every agent‑to‑tool pair.
- Unified observability: All authorization decisions, including Okta grants, appear in CloudWatch, simplifying incident response and compliance reporting.
- Prerequisite footprint: Deploying a second agent on EKS adds the need for
eksctl,kubectl, Docker, Okta log streaming, and appropriate IAM permissions for Gateway, policy engine, EKS, CloudWatch, and EventBridge.
Related CloudNinjas coverage: AWS.
What This Means For Practitioners
Adopt the Gateway pattern when you anticipate more than a handful of agents or tools; it consolidates policy, reduces IAM complexity, and gives you a single audit log. Verify that Cedar policies are comprehensive before onboarding new tools, and test the end‑to‑end OpenTelemetry pipeline to ensure visibility. Finally, monitor the cost and operational overhead of the Gateway and any additional EKS clusters, and keep the Okta log streaming configuration in sync with your CloudWatch retention policies.


