AWS Nitro Sandboxes give EKS pods their own kernels, with two ways to handle host trust

AWS has introduced Nitro Sandboxes, an opt-in feature that runs a Kubernetes pod, ECS task or EC2 workload in a lightweight virtual machine with its own guest kernel. The Nitro hypervisor allocates the VM from a running EC2 instance. The feature is available in all commercial AWS regions at no additional charge.

AWS highlights coding agents as a use case: an operator may trust the infrastructure without trusting the code an agent runs. Other uses AWS identifies include multi-tenant SaaS, regulated workloads, CI builds and remote development environments. On Amazon EKS, the choice of sandbox depends on whether the workload also needs protection from the host.

What each EKS sandbox protects

On a sandbox-capable node, a pod opts in by setting runtimeClassName to isolated-sandbox or confidential-sandbox. According to the EKS documentation, a process on the parent instance starts a Firecracker microVM as a first-level, hardware-assisted guest. An agent inside the VM runs the pod’s unmodified containers using its own containerd. The sandbox shares neither a kernel nor memory mappings with the parent instance or neighboring sandboxes.

Isolated mode trusts the parent instance but not the guest. Operators retain access to logs, process lists and kubectl exec. AWS Container Hero Sandip Das noted that this protection works in one direction: a compromised parent can still observe or alter unencrypted traffic and DNS, write to a pod’s /etc/hosts and issue Pod Identity credentials for any pod on the node.

Confidential mode treats the parent as untrusted. A Cedar policy generated from the pod specification fixes image digests, arguments, environment, mounts and capabilities. The guest enforces the policy and disallows exec and standard input. Image layers can also be encrypted so the parent transports ciphertext it cannot read.

The Nitro Secure Module records measurements of the image and policy in platform configuration registers (PCRs). An AWS Key Management Service policy can restrict key release to sandboxes with matching measurements. The EKS documentation cautions that recording is not verification: without a KMS policy or an external verifier checking the PCR values, the confidentiality guarantee is incomplete.

Either mode can start without a network device. That setting also removes DNS, NTP, access to instance metadata and Pod Identity; HTTP and TCP health probes will no longer work.

Deployment requirements and capacity limits

EKS Auto Mode supplies both runtime classes and provisions capable nodes on demand. Standard EKS requires a sandbox-enabled Amazon Machine Image for node groups or Karpenter. Das identified additional prerequisites: Kubernetes 1.36 or later, Pod Identity rather than IRSA for credentials, and a launch template with Nitro Enclaves enabled for managed node groups. Without that template setting, he said, sandbox pods remain Pending.

At launch, Firecracker does not support host-device passthrough, ruling out GPU pods. Node capacity also limits placement: both the number of sandboxes and their combined vCPU count are capped at five times the node’s vCPU count. The cap is halved for instance types that allow CPU overcommit. Under the five-times cap, a four-vCPU node can accommodate 20 one-vCPU sandboxes or five four-vCPU sandboxes.

Those placement limits are not a measure of throughput. On processors with simultaneous multithreading, core scheduling prevents different sandboxes from using sibling threads on the same core, leaving roughly half the nominal vCPUs usable. Graviton processors, with one thread per core, are unaffected. Das recommended treating AWS’s description of performance as “near-native” as a vendor claim and benchmarking startup latency, I/O throughput and tail latency. The roughly two-second allocation time cited for the open-source agent-sandbox project is for a prestarted VM from a warm pool, not a cold start.

Google’s GKE Sandbox illustrates the alternatives. Its gVisor runtime, available since 2019, intercepts system calls in a userspace kernel, starts in under 200 milliseconds and supports CUDA on some GPUs. Its newer microVM class, based on Kata Containers and Cloud Hypervisor, takes one to two seconds to start, reserves 250 millicores of CPU and 130 MiB of memory per pod, and does not support GPUs. AWS likewise chose a VM boundary, but describes its overhead through node density and thread constraints rather than a fixed per-pod reservation.

On EC2, Amazon Linux and Firecracker have native support; other hypervisors can use patches. The EC2 user guide lists supported instance types and notes that snapshots, restore and live migration are not supported.