Enterprise AI, cloud modernization, cybersecurity and platform engineering.
Resources › Guide

Amazon Bedrock AgentCore Security: 8 Steps Before Your AI Agents Reach Production

iNET SYSTEMS Cloud Practice • Published • Last updated • 6 min read
Reviewed by iNET SYSTEMS Architecture Practice

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.

AgentCore Runtime shared responsibility
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.

  1. 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.
  2. Lock the role's trust policy. Add aws:SourceAccount and aws:SourceArn conditions to prevent confused-deputy access. The role should have equal or fewer privileges than the principals who can invoke it.
  3. Confirm MMDSv2 everywhere. Since June 30, 2026, runtimes without it can't be invoked and return a ValidationException. Check that requireMMDSV2 is true on every runtime, including old test ones.
  4. Make the gateway the only way in. Restrict each runtime to calls from AgentCore Gateway: a resource-based policy for IAM (SigV4) runtimes, or allowedWorkloadConfiguration for 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.
  5. 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_ONLY mode first, then switch the gateway to ENFORCE (enforcement modes).
  6. 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 InvokeAgentRuntimeForUser and GetWorkloadAccessTokenForUserId where they aren't needed.
  7. 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:subnets and bedrock-agentcore:securityGroups condition keys.
  8. 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.

AI agent risks and the AgentCore or AWS control for each
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.

Questions about this article

What is Amazon Bedrock AgentCore?

Amazon Bedrock AgentCore is AWS's set of managed services for running AI agents in production. Runtime hosts agents in isolated microVMs, Gateway exposes tools, Policy evaluates tool requests against Cedar policies, and Identity manages the identities and credentials agents use to reach other services.

Is Amazon Bedrock AgentCore secure by default?

AgentCore gives strong isolation, with a dedicated microVM per session and TLS 1.2 or higher in transit, but several settings are yours. The role the CLI creates can invoke all foundation models and inference profiles in the account, and policies, network egress and data event logging depend on how you configure them.

How does Policy in AgentCore work?

Policy in AgentCore intercepts agent traffic through AgentCore Gateway and evaluates each request against Cedar policies. It is default-deny, and forbid always wins over permit. Conditions can use OAuth claims and tool inputs. Test policies in LOG_ONLY mode, then switch the gateway to ENFORCE.

What is MMDSv2 in AgentCore and why does it matter?

MMDSv2 is the version of the microVM metadata service that AWS has required for AgentCore runtimes since June 30, 2026. Runtimes without it can't be invoked. It matters because code inside the microVM can request the execution role's credentials from the metadata service, so the role itself must still be least-privilege.

How do you audit what an AI agent did on AWS?

Turn on CloudTrail data events for AgentCore Runtime, because trails don't log data events by default, and confirm with a test call. Add CloudWatch Logs and VPC Flow Logs, correlate by request ID, alarm on authorization failures and forward everything to a SIEM.

Should AI agents on AWS have internet access?

Only when a specific task needs it, and only to named destinations. Deploy runtimes in private subnets, use PrivateLink endpoints for AWS application programming interfaces (APIs) and restrict security group egress. Broad outbound access lets a prompt-injected agent send data out or reach systems it was never meant to touch.

Related service

AWS Consulting for IAM, Governance and EKS

AWS consulting for IAM, multi-account governance, VPC networking, Amazon Elastic Kubernetes Service (EKS) and resilience. Review risks and implement a documented cloud foundation.

Explore AWS Consulting for IAM, Governance and EKS

Further reading

Source and what it covers
AWS security documentation
AWS. AWS's documentation for its security, identity and compliance services.
AWS Well-Architected
AWS. AWS's design principles for secure, reliable and cost-efficient workloads.
OWASP Top 10 for Agentic Applications
OWASP. The ten most critical security risks for autonomous AI agents.
NIST AI Risk Management Framework
NIST. A voluntary framework for managing the risks of designing, building and using AI systems.
Model Context Protocol
Model Context Protocol. An open protocol for connecting AI applications to tools and data.
Talk to us

Want help putting this to work?

We can help you turn these steps into a plan that fits your team.

New to iNET SYSTEMS? Meet our founder, see how we work, read the FAQs or start with an AI Security Readiness Assessment.

Book a 30-minute Call
Contact us