
The Architecture of Secure AI
AI agents are autonomous cloud workloads
For most of our careers, a workload in the cloud did what its code said. If you wanted to know what a service account would do with its permissions, you read the code. AI agents change that assumption. An agent is still a cloud workload with credentials: it calls APIs, reads from storage, sends traffic and spends money. But now the workload holding those credentials, the agent itself, decides at runtime what to do with them.
Guardrails are the first answer most teams reach for, and they’re worth having. They screen what goes into and comes out of a model, and like any classifier they miss some of it. They also can’t limit what an agent does with the permissions it already has. That part has to be enforced by the infrastructure the agent runs on.
Native’s approach to securing cloud and AI infrastructure starts with three established layers of cloud security: network, resource and data, and identity. AI agents extend that architecture to two additional layers: LLM inference and the agent harness. Together, these five layers provide the foundation for enforcing security across cloud and AI infrastructure.
The three foundational layers of cloud security
The first three enforcement layers are fundamental to cloud security. The autonomy of AI agents makes each of them even more critical.
Network. The network layer decides where traffic can come from and where it can go. For agents, that extends to which networks can trigger an agent, which networks it runs in, and where it can send what it finds. That makes ingress and egress more critical than ever. Anyone who can reach an agent can try to steer it, and so can anything it reads, like a web page or a ticket. Egress limits which outside sites it can read from and where it can send what it finds. In the cloud, that includes the provider’s own storage APIs: allowing the storage service allows every customer’s buckets, including an attacker’s, unless your endpoint policies only allow your organization’s resources. Approved egress matters as much as ingress. For agents on Amazon Bedrock AgentCore, Native’s egress policy limits them to approved destinations, like your own GitHub repositories and approved MCP servers.
Resource & data. The resource & data layer decides what data and resources can be reached, and where they live. For agents, that extends to the knowledge bases, memory stores and tuned models they create and use, and the regions they run in. An agent can expose what it can reach, and it can also create new resources that expand the potential exposure. That makes approved knowledge bases critical: an agent should only reach knowledge bases built from data cleared for AI use, with nothing sensitive in them.
Identity. The identity layer decides who can act, and with what permissions. For an agent, that means permissions scoped to its task, delegated access that never exceeds what the user behind it could do, and no long-lived keys. Your cloud can enforce that directly: block long-lived keys from being created or used, and only accept credentials used from inside your own networks. A key that leaks is then much harder to use anywhere else.
The controls already exist in your cloud. The work is making sure they’re enforced on your AI agents.
Extending enforcement to AI agents
AI agents introduce new enforcement requirements at two additional layers, where security ownership is still emerging in many organizations.
LLM inference. The LLM inference layer decides which models can be called, with which keys, and with guardrails required on every call. As agents invoke models autonomously, decisions about which providers and models are approved, which credentials can reach them, and whether a guardrail is attached can’t be left to each developer to remember. Those decisions belong in policies enforced at the infrastructure level, regardless of who built the agent or what it’s asked to do.
Harness. The harness layer decides what an agent can do with its tools, MCP servers and sandbox, and which of its actions need a person’s approval before they run. It’s where a model’s output becomes an action in your environment: a ticket opened, a record changed, a file written. Which tools are allowed, which actions each MCP server can take, and which steps wait for a person can’t be left to the agent’s own code. These requirements need to be enforced independently of the agent, so a manipulated agent can’t switch them off. On AWS, Native supports Amazon Bedrock AgentCore, enforcing which tools and MCP servers an agent can call with AgentCore Policy at the gateway.
What makes these two layers work is where they’re enforced. Guidance written into an agent depends on the model following it. Policies enforced by the underlying infrastructure operate independently of the model’s reasoning. LLM inference and harness controls should therefore be enforced at points the agent cannot override.
A unified enforcement architecture
Together, the five layers form a unified enforcement architecture. The applicable controls evaluate each action, regardless of whether it originates from an employee, an AI agent or an attacker.
They’re one system, and their strength comes from working together. Each layer checks something different: where a request comes from, what it can reach, who’s making it, which model it calls and what action it takes. Each layer can deny a request independently. When one layer has a gap, whether it’s an unrestricted region or an overly permissive role, another layer can still deny the action. That’s defense in depth enforced through architecture.
One attack, five layers: LLMjacking
The clearest way to see the five enforcement layers at work is to walk one attack through them. LLMjacking is a good test: an attacker steals a cloud credential, uses it to call a hosted model, and leaves the victim with the bill.
The setup. A static IAM user key leaks in a repo. From their own host, the attacker calls a model nobody approved, with no guardrail attached, and queries a knowledge base built on customer data, directly on Amazon Bedrock.
Watch the same request play out twice. First, without enforcement, the attacker reaches the model and generates costs. The animation then shows how independently enforced controls across the five layers can deny that same unauthorized request before the model is invoked.
The recap. Here’s each layer, what the attacker brings to it, and the AWS control that denies it.
| Layer | What the attacker brings | Control that denies it |
|---|---|---|
| Network | Calls from the attacker’s own host | Deny Bedrock calls that don’t arrive through an approved VPC endpoint (aws:SourceVpce), with the standard exceptions for AWS services acting on your behalf |
| Resource & data | A query to a knowledge base built on customer data | Allow Retrieve and RetrieveAndGenerate only on approved knowledge bases, built from data sources cleared for AI use |
| Identity | A static IAM user access key, leaked in a repo | Deny Bedrock to IAM users (aws:PrincipalType is User), requiring an authorized non-user principal |
| LLM inference | A model nobody approved, with no guardrail attached | Deny model invocation outside the approved enterprise models, or without an approved guardrail (bedrock:GuardrailIdentifier) |
| Harness | Direct API calls from a script, with no agent runtime | Deny model invocation unless the caller is an approved agent-runtime role (aws:PrincipalTag, with the tag locked so only the platform can set it) |
Why this matters. LLMjacking illustrates the intersection of cloud security and AI security. A compromised cloud credential becomes a means of exploiting AI infrastructure. The same enforcement architecture protects against both.
The takeaway. Each denial is independent: the identity control doesn’t need the network control to work, and the runtime-role restriction doesn’t need either. In practice, you get protection from the first control you roll out. Any one of these controls denies this request on its own. An attacker who adapts can switch to an approved model and attach the required guardrail. The identity, network and runtime-role controls are much harder to work around, because they depend on what the credential is and where the call comes from, not on what the attacker asks for. Enforcing all five reduces the risk that a gap in any single layer leads to unauthorized AI consumption. Detection alone may identify the activity only after costs have been incurred.
Enforcement at the infrastructure layer
The foundation of Native’s approach is enforcement independent of the agent, using the security controls of the infrastructure it runs on. A control that lives in the agent’s code only works if the agent runs it and the model follows it. Infrastructure-level controls can evaluate the request independently of the agent. And controls set at the organization level, like SCPs, cover every agent in every member account, not just the ones someone remembered to configure. When an agent calls a model, reaches for a tool or touches data, the applicable enforcement point checks the request against your policy before authorizing it. When the policy is set correctly, that check is reliable and hard to get around, whether the caller is a well-built agent, a manipulated one or an attacker with a stolen key.
Operationalizing secure architecture
Native helps security teams operationalize this five-layer architecture across their cloud and AI infrastructure. Teams define their security intent, test the corresponding controls against real activity before enforcing them, and keep those controls aligned as their environments evolve.
The result is security architecture that continuously enforces what identities, workloads and AI agents are authorized to do.

