Home icon

Secure AI agent access patterns to AWS resources using Model Context Protocol

Security Blog



This article presents three security principles for securing AI agent access to AWS resources through the Model Context Protocol (MCP), addressing the unique challenges of non-deterministic AI systems.

  • Assume all granted permissions could be used by agents operating at machine speed without human judgment
  • Design permissions based on acceptable scope of impact, not intended functionality alone
  • Provide organizational guidance through role governance, session policies, permission boundaries, and SCPs
  • Differentiate AI-driven from human-initiated actions using context keys or session tags
  • AWS-managed MCP servers automatically inject context keys for differentiation without configuration
  • Self-managed MCP servers require modifying code to add session tags for differentiation
  • Implement session policies for code-controlled agents to scope permissions per tool invocation
  • Use permission boundaries and SCPs for config-bound agents to enforce maximum permissions
  • Monitor CloudTrail logs to audit agent activity and detect unauthorized operations
  • Restrict general-purpose tools like bash to prevent agents from bypassing MCP servers

Organizations should implement these three principles in sequence: establish least privilege permissions, enforce organizational controls through role governance, then add differentiation mechanisms based on MCP server type.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

May 15
2026
The AWS AI Security Framework: Securing AI with the right controls, at the right layers, at the right phases
Jun 1
2026
Secure AI agents with Policy and Lambda interceptors in Amazon Bedrock AgentCore gateway
Jun 5
2025
Use AI agents and the Model Context Protocol with Amazon SES
Dec 2
2025
AWS Security Agent (Preview): AI agent for proactive app security

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.