惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
T
The Blog of Author Tim Ferriss
量子位
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
小众软件
小众软件
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
I
InfoQ
美团技术团队
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
博客园 - 【当耐特】
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Help Net Security

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
One Tool Call Away From a $10,000 AWS Bill
PolicyLayer · 2026-06-16 · via DEV Community

PolicyLayer

It's 2 AM. Your coding agent is refactoring a microservice. It decides the best path forward is to "clean up" the staging environment — deletes three S3 buckets, tears down a CloudFormation stack, and spins up eight m5.4xlarge instances to "run integration tests faster." By morning, the bill is north of $10,000. The agent wasn't malicious. It was helpful. That's what makes it dangerous.

The AWS MCP server from AWS Labs gives agents direct access to 55 tools spanning EC2, S3, Lambda, DynamoDB, EKS, CloudFormation, and Terraform. Read access, write access, and — crucially — delete access. All through a single MCP connection. No confirmation dialogs. No spending caps. Just tool calls.

55 Tools, Including Delete and Destroy

The awslabs/mcp server exposes tools that fall into four categories:

  • Read tools (25+): list_resources, get_resource, describe_log_groups, search_documentation — harmless, let them run
  • Create tools: create_resource, create_table_from_csv — each one potentially spinning up billable infrastructure
  • Execute tools: call_aws, invoke_lambda, tf_apply, manage_eks_stacks — arbitrary API calls and infrastructure changes
  • Destructive tools: delete_resource, tf_destroy — the ones that keep you up at night

The problem isn't that these tools exist. They're genuinely useful. The problem is that nothing stops an agent from calling delete_resource on your production S3 bucket or create_resource in a loop until you've provisioned a hundred EC2 instances. System prompts don't enforce anything — they're suggestions the model can ignore, misinterpret, or override when it thinks it knows better.

Block Destructive Ops, Rate Limit Creation

Intercept sits between your agent and the AWS MCP server as a transparent proxy. Every tools/call passes through it and gets evaluated against a YAML policy before reaching upstream. Here's what the key sections of the AWS policy look like:

Hard-block deletions:

delete_resource:
    rules:
      - name: "block-delete"
        action: deny
        on_deny: "Resource deletion blocked by policy"

tf_destroy:
    rules:
      - name: "block-destroy"
        action: deny
        on_deny: "Infrastructure destruction blocked by policy"

No conditions, no exceptions. delete_resource and tf_destroy are denied unconditionally. The agent gets back a clear error message explaining why. It can carry on with its work using every other tool — it just can't delete anything.

Rate limit resource creation:

create_resource:
    rules:
      - name: "rate-limit-create"
        rate_limit: "10/hour"
        on_deny: "Rate limit: max 10 resource creations per hour"

The agent can still create resources, but no more than 10 per hour. Intercept tracks this with a stateful counter (SQLite by default, Redis for multi-instance setups). The counter persists across restarts, so killing and restarting the proxy doesn't reset the budget.

Rate limit write operations:

call_aws:
    rules:
      - name: "rate-limit-writes"
        rate_limit: "30/hour"
        on_deny: "Rate limit: max 30 write operations per hour"

The same pattern applies to call_aws, invoke_lambda, tf_apply, manage_eks_stacks, and update_resource — anything that mutates state gets capped at 30 operations per hour.

Global safety net:

"*":
    rules:
      - name: "global-rate-limit"
        rate_limit: "120/minute"
        on_deny: "Global rate limit: max 120 calls per minute"

The wildcard rule catches everything, including read operations. Even if the agent goes into a tight loop calling list_resources, it'll get throttled before it hammers the AWS API hard enough to trigger their own rate limits (and the associated costs of retries and backoff).

Read tools like describe_log_groups, search_documentation, and get_resource have no rules at all — they pass straight through. No point adding friction to operations that cost nothing and change nothing.

Getting Started

Install Intercept and scan the AWS MCP server to generate a policy scaffold:

npm install -g @policylayer/intercept

intercept scan -o aws-policy.yaml -- npx -y @aws/mcp

The generated policy already includes sensible defaults — the same deny rules and rate limits shown above. Edit it to match your use case: tighten the rate limits, loosen them, add argument-level conditions, or flip default: "allow" to default: "deny" for a strict allowlist approach.

Then run Intercept as your MCP server instead of the upstream directly:

intercept -c aws-policy.yaml -- npx -y @aws/mcp

Your agent connects to Intercept like it would connect to any MCP server. Same tools, same schemas, same interface. The difference is that every call now passes through your policy before reaching AWS. Spending controls that actually enforce, not suggest.

The full AWS policy covers all 55 tools with categorised rules, comments explaining each tool's purpose, and tuneable rate limits. Use it as-is or as a starting point.

Full AWS policy →