AWS introduced Nitro Sandboxes this week and promoted them again on its official X account on November 11. A Nitro Sandbox is a lightweight VM managed by the Nitro Hypervisor: each EKS pod, ECS task or EC2 workload gets its own kernel and a hardware-isolated boundary while still running on EC2 instances you already have. AWS names AI agents that run LLM-generated code as a core use case: one sandbox per session, so code that a prompt injection tricks the agent into running stays trapped in that VM, which is deleted when the session ends. Turning it on in EKS or ECS is a one-line change; it works on most Nitro-based instances in all commercial Regions at no additional charge.

Key Takeaways

  • ✓Isolation: 1 dedicated VM with its own kernel per pod, task or agent session, so a kernel bug in one sandbox does not reach its neighbors; no nested hypervisor, so CPU and memory run at near-native EC2 performance
  • ✓Enablement: on EKS add 1 runtimeClassName line to the pod spec (confidential-sandbox or isolated-sandbox); on ECS set isolationMode in a Managed Instances task definition
  • ✓Two modes: Isolated trusts the node operator and launches faster; Confidential is fully attestable, with image loading gated by a Cedar policy and KMS releasing secrets only to sandboxes that prove they run approved code
  • ✓AI use cases: one sandbox per agent session, deleted when the session ends; model providers can deploy closed weights in a customer account that are decrypted only inside an attested sandbox
  • ✓Pricing and reach: 0 additional charge (you pay for EC2 plus the EKS Auto Mode or ECS Managed Instances fee), on Graviton, Intel and AMD, with native Amazon Linux and Firecracker support
AWS Launches Nitro Sandboxes: Every EKS Pod and ECS Task Can Run in Its Own Hardware-Isolated VM, AI Agents Get One Sandbox per Session for Generated Code, With Attestation at No Extra Charge
🖼️Official Media
Click to view high-res
🧭

Turn your technical choice into a development budget

Compare 40 dev plans & simulate token costs vs $20/mo subscriptions

🔬

In-Depth Technical Analysis

Background and the problem it solves

Containers became popular because many of them share one Linux kernel on a host, which makes them light to deploy and efficient to pack. It also means one bug in the shared kernel can expose every container on the host, and cluster operators can see every task. AI agents make this sharper: agents write and run their own code, and after a prompt injection that code may be the attacker's. Until now, a hard boundary meant a dedicated instance per workload or a do-it-yourself setup with Firecracker or gVisor. In the past few days Google's Gemini self-hosted environments and NVIDIA OpenShell have also tackled where agent code runs and how it is isolated.

Architecture and how it works

A Nitro Sandbox is a lightweight VM that you launch and control from your EC2 instance. To the instance it looks like a child VM, but it actually runs alongside the instance on the Nitro Hypervisor, which enforces separation in hardware between the parent, between sandboxes, and from AWS operators. It reuses the isolation technology of Nitro Enclaves with three changes: vCPUs can time-share cores with the parent, the parent can attach standard virtio network and block devices instead of only a vsock channel, and sandboxes can run under standard VMMs such as Firecracker. Security groups and network policies are enforced on the parent outside the sandbox, so a compromised workload cannot turn them off. Confidential mode also produces an attestation document through the Nitro Secure Module, so KMS key policies can release secrets only after the code proves its identity.

Benchmarks and measured results

AWS has not published launch latency or performance benchmarks. It says compute and memory run at near-native EC2 performance and that Isolated mode launches faster than Confidential mode. The cost pitch is no additional charge plus better utilization, since many isolated workloads can be consolidated onto one instance.

Getting started

EKS: use EKS Auto Mode and add runtimeClassName: isolated-sandbox or confidential-sandbox to the pod spec; EKS handles instance selection and scheduling. Self-managed EKS needs a compatible AMI. ECS: enable nitroEnclavesEnabled on an ECS Managed Instances capacity provider, add a trustedExecutionConfiguration block to the task definition with isolationMode set to ISOLATED_SANDBOX or CONFIDENTIAL_SANDBOX, and use awsvpc networking. If you build your own platform, launch Nitro Sandboxes directly on EC2 with Firecracker, after enabling Nitro Enclaves when you launch the parent instance.

Action HubReady to adopt this in production?

Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.

Up NextNVIDIA Donates OpenShell, Its AI Agent Security Runtime, to CNCF as a Sandbox Project: Cedar Policies and an Agent Substrate Integration With Google
Read Now→