DEV Community

Cover image for Hardening Bedrock AgentCore against the sandbox DNS-exfiltration path (with a working CrewAI deployment)
Farith Heras Garcia
Farith Heras Garcia

Posted on

Hardening Bedrock AgentCore against the sandbox DNS-exfiltration path (with a working CrewAI deployment)

Most Bedrock AgentCore + CrewAI walkthroughs get you from local prototype to a deployed agent. Few of them touch what happens after that — specifically, the IAM role the Starter Toolkit hands you by default is broader than most agents need, and AgentCore's Sandbox network mode still permits outbound DNS queries, which is exactly the path BeyondTrust's Phantom Labs used to demonstrate a covert C2 channel in the Code Interpreter earlier this year.

I put together a starter kit that deploys a real CrewAI multi-agent system on AgentCore with IAM scoped to what the agents actually touch, and network isolation config that closes that DNS path. It also includes the reasoning for choosing CrewAI over Strands/LangGraph for this pattern, since that's a decision most teams end up re-deriving on their own.

It's not a demo — it's built from the same patterns I've used in real implementation work, packaged so you don't have to reconstruct the hardening from scratch.

agentic-ai.es — happy to answer questions on the IAM scoping or the network config specifically, that's the part most posts skip.

Top comments (0)