Key takeaway: AgentCore security on Amazon Web Services (AWS) starts with the parts you own. Give each Amazon Bedrock AgentCore runtime a least-privilege execution role, send its traffic through AgentCore Gateway with Cedar policies, keep it in private subnets with tight egress, require microVM Metadata Service Version 2 (MMDSv2), use AgentCore Identity for outbound tokens, and confirm that CloudTrail is really recording runtime activity.
Enterprise cloud services used to mean virtual machines, databases and Kubernetes clusters. On AWS in 2026 they increasingly include artificial intelligence (AI) agents running on Amazon Bedrock AgentCore, calling tools through a gateway and acting on behalf of users. AgentCore makes those agents fast to ship. It doesn't make every setting safe by default.
The gap is already visible. Palo Alto Networks' State of Cloud Security Report 2026 found that nearly three-quarters of organizations grant agents permission to modify code, continuous integration and continuous delivery (CI/CD) configuration or production environments, and 40% have been unable to reconstruct an agent's actions (Help Net Security, November 17, 2026). This guide sits on top of our AWS security baseline, which covers the accounts and guardrails underneath.
What is Amazon Bedrock AgentCore?
Amazon Bedrock AgentCore is AWS's set of managed services for running AI agents in production. It splits the job into components you can secure separately:
- AgentCore Runtime runs agent code. Each user session runs in a dedicated microVM with isolated central processing unit (CPU), memory and filesystem. When the session completes, the microVM is terminated and its memory is sanitized.
- AgentCore Gateway is the governed entry point that exposes tools to agents, including Lambda, OpenAPI and Smithy targets and Model Context Protocol (MCP) servers.
- Policy in AgentCore intercepts agent traffic through the gateway and evaluates each request against defined policies, outside the agent's own code.
- AgentCore Identity provides identity and credential management, so agents can reach AWS resources and third-party services on behalf of users.
The model is Zero Trust applied to a non-human workload: authenticate every caller, authorize every tool call, and assume the agent can be manipulated. Our guide to AI agent identity explains the same model across clouds.
What does AWS secure in AgentCore, and what do you own?
AWS secures the microVM isolation, the operating system kernel and the underlying infrastructure. You own the agent code, identity and access management (IAM), network configuration and prompt-injection defense. AWS's AgentCore Runtime security best practices set out the split.
| Area | AWS | You |
|---|---|---|
| Isolation | A dedicated microVM per session | Mapping sessions to users on platform version V1 or on Instances, where AgentCore doesn't enforce it |
| Patching | Kernel in all modes; language runtimes for direct code deployments until their end of support | Container image rebuilds; moving off runtimes past end of support |
| Identity and access | The IAM and AgentCore Identity services | Execution roles, resource policies, inbound token settings |
| Network | Underlying network; Transport Layer Security (TLS) 1.2 or higher in transit | Subnets, security groups, endpoints and egress rules |
| Agent behavior | Not covered | Input validation, prompt-injection defense and tool scope |
One detail stands out. AWS warns that any code or actor inside the microVM can get the execution role's credentials by calling the microVM metadata service (MMDS). A prompt-injected agent that can run code has exactly the permissions of its role, so the role's scope is your real blast radius.
How do you secure Amazon Bedrock AgentCore? 8 steps
Apply these eight steps to every runtime before it handles real users or data. They draw on AWS's AgentCore guidance and the Well-Architected Agentic AI Lens; the order is ours.
- Replace the default execution role. By default, the role the command-line interface (CLI) creates permits invoking all foundation models and inference profiles in the account. Create a least-privilege role per runtime, scoped to named models and resources, and validate it with IAM Access Analyzer.
- Lock the role's trust policy. Add
aws:SourceAccountandaws:SourceArnconditions to prevent confused-deputy access. The role should have equal or fewer privileges than the principals who can invoke it. - Confirm MMDSv2 everywhere. Since June 30, 2026, runtimes without it can't be invoked and return a
ValidationException. Check thatrequireMMDSV2istrueon every runtime, including old test ones. - Make the gateway the only way in. Restrict each runtime to calls from AgentCore Gateway: a resource-based policy for IAM (SigV4) runtimes, or
allowedWorkloadConfigurationfor Open Authorization (OAuth) runtimes. A gateway that can be bypassed isn't a control. For the tools behind it, see our Open Worldwide Application Security Project (OWASP) MCP Top 10 assessment. - Write Cedar policies, test them, then enforce. Policy in AgentCore is default-deny and forbid always wins. Conditions can use OAuth claims and tool inputs. Run in
LOG_ONLYmode first, then switch the gateway toENFORCE(enforcement modes). - Use AgentCore Identity for outbound credentials. Keep tokens and keys out of code. Prefer JWT-based user identification in production over the user ID header, and deny
InvokeAgentRuntimeForUserandGetWorkloadAccessTokenForUserIdwhere they aren't needed. - Keep runtimes private with tight egress. Use private subnets, PrivateLink endpoints for the AgentCore data and control planes, a scoped Amazon Simple Storage Service (S3) gateway endpoint policy, and security groups that allow only required destinations. Enforce approved networks with the
bedrock-agentcore:subnetsandbedrock-agentcore:securityGroupscondition keys. - Log everything, and check that you are. CloudTrail logs AgentCore Gateway calls (
InvokeGateway) as data events, and trails don't log data events by default. Turn them on, then make a test call and find it in the log. Add CloudWatch Logs, virtual private cloud (VPC) Flow Logs, request ID correlation and alarms on authorization failures, and forward it all to your security information and event management (SIEM), such as Microsoft Sentinel.
For tools that change things (payments, database writes, outbound email), put human approval in the workflow itself. The Agentic AI Lens suggests AWS Step Functions callbacks, which let an agent pause and wait for approval.
"The execution role is the agent's blast radius, and the gateway is only a control if nothing can go around it. Get those two right before you worry about anything else."
iNET SYSTEMS Cloud Practice
Which AgentCore controls address which agent risks?
Each major agent risk has a matching control, but most need configuration.
| Agent risk | Control | What to set |
|---|---|---|
| Over-privileged agent | Execution role, IAM Access Analyzer | One least-privilege role per runtime |
| Tool misuse | Gateway and Cedar policy | A policy engine on the gateway, in ENFORCE mode |
| Credential theft | AgentCore Identity, MMDSv2 | No secrets in code; requireMMDSV2 on |
| User impersonation | JSON Web Token (JWT) inbound authentication | JWT path; deny the ForUser and ForUserId actions |
| Data exfiltration | VPC mode, security groups, endpoint policies | Private subnets and scoped egress |
| Direct tool dispatch through crafted input | Input validation in your entrypoint | Accept only text prompts; reject or strip toolUse blocks |
| No audit trail | CloudTrail, CloudWatch, VPC Flow Logs | Data events on, correlated by request ID |
What are the most common AgentCore security mistakes?
Keeping the CLI defaults, letting callers bypass the gateway, and trusting the prompt to enforce rules. They come from moving a prototype straight to production.
- Shipping with the CLI-generated execution role
- Allowing direct runtime invocation alongside the gateway
- Relying on prompt instructions for authorization, which the Agentic AI Lens calls insufficient because prompts can be manipulated
- Passing unvalidated payloads to the agent. AWS warns that crafted tool-use content bypasses model reasoning, guardrails and system prompt enforcement
- Broad outbound security group rules "for now"
- Logging agent actions under an engineer's own identity or personal access token, which Palo Alto Networks found 53% of engineers do
To keep these controls across every agent platform you run, build them into your agentic AI governance framework. AWS re:Invent 2026 may bring new AgentCore features, so recheck the AWS documentation before you rely on a setting here.
Shipping AI agents on AWS?
Book a cloud security assessment with iNET SYSTEMS. We'll review your AgentCore execution roles, gateway policies, network egress and audit logging, and give you a prioritized fix list. Book your assessment or explore our AWS consulting services.

