
AWS Nitro Sandboxes: VM Isolation for EKS Pods in One Line
Cloud Platform EngineeringAWS says it now takes one line in a pod spec to give a Kubernetes pod the isolation of a dedicated EC2 instance. AWS Nitro Sandboxes, launched for Amazon EKS on November 9, run each sandboxed pod in its own lightweight virtual machine on the Nitro System. For platform teams asked to run untrusted code, from customer plugins to AI coding agents, that changes what the shared node kernel has to be trusted with.
What Happened
AWS’s launch post, by Carlos Santana and Trishi Mehta, introduces two modes. Isolated mode protects the host and neighboring pods from the container. Confidential mode also treats the machine operator as untrusted. On EKS Auto Mode, opting in is a single field, runtimeClassName: isolated-sandbox, or confidential-sandbox for the stricter mode. “Nothing to install,” the post says. The feature requires Kubernetes 1.36 or later.
Standard EKS clusters with their own node groups or Karpenter can use the same pod specs once the nodes run a sandbox-enabled AMI. AWS also states that Nitro Sandboxes pass “every Kubernetes conformance test.”
How It Works
The post walks through the lifecycle. The scheduler places the pod as usual, and the RuntimeClass carries the node selector and toleration that land it on a sandbox-capable node. EKS then asks EC2 for a Nitro Partition and boots a VM inside it instead of starting containers on the node’s kernel. The Nitro Hypervisor enforces the CPU and memory boundary in hardware. The Nitro security whitepaper covers that same isolation model for EC2.
Inside the VM, a component receives the pod spec and its Cedar policy, checks that what will run is allowed, pulls the images and starts the containers. Kubernetes still sees a normal pod: logs, exec, port-forward, probes and metrics flow back to the kubelet, and Pod Identity credentials, CSI volumes and VPC networking are delivered into the VM. A test pod reads its DMI product name as 8i.enclave, and its disks appear as vda devices rather than the node’s NVMe drives.
In confidential mode, AWS KMS releases decryption keys only against an attestation document covering the system image and the configured Cedar policy, signed by the Nitro Security Module. An annotation, sandbox.amazonaws.com/network-isolated: "true", boots the VM with no network beyond loopback.
What This Means for You
AWS’s worked example is a coding agent. It gets Bedrock access through Pod Identity, scoped to bedrock:InvokeModel*, and a fine-grained token for one GitHub repository. An EKS Auto Mode ApplicationNetworkPolicy limits egress to CoreDNS and HTTPS to the Bedrock and GitHub hostnames. The post itself flags one gap: “github.com is reachable as a whole,” so hostname policy alone doesn’t stop an agent from pushing elsewhere on GitHub. The sample repository has the manifests.
Isolation limits damage to the host, but credentials and egress decide what an agent can do. Stack Archive’s look at why sandboxing alone isn’t enough covers the other half of the problem: running isolated agent fleets efficiently at scale.
The So What
Platform teams running untrusted or agent-generated code on EKS should test Nitro Sandboxes on a Kubernetes 1.36+ Auto Mode cluster, starting with the workloads that currently get a dedicated node group just for isolation. Pair the one-line opt-in with scoped Pod Identity and an egress policy. Check pricing and Region availability in the EKS user guide before committing a fleet.
Source: AWS Containers Blog
Content created with AI assistance and reviewed for accuracy.
Join the conversation
Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.
Join Stack Insiders →