AWS Nitro Sandboxes Explained: VM-Level Isolation for EKS Pods and ECS Tasks
Every pod on a standard Kubernetes node shares one Linux kernel, so a single kernel bug can turn one tenant’s container into everyone’s problem. On November 10, 2026, AWS shipped AWS Nitro Sandboxes, which gives each EKS pod, ECS task, or EC2-hosted workload its own hardware-isolated microVM with a separate kernel — selected with one field in the pod spec or task definition. The timing matters. AI agents now run generated code on shared nodes, SaaS platforms bin-pack tenants to cut cost, and CI systems execute untrusted pull requests with privileged builds. The interesting part is not the microVM itself; Firecracker has existed since 2018. It is the trust model. There are two modes, and they disagree about whether you trust the machine your workload runs on. This explainer gives you that trust model, a threat table, the architecture, and the setup and capacity rules that AWS documents.
What this covers: how a Nitro Sandbox is built, isolated versus confidential mode, Nitro Enclaves vs Nitro Sandboxes, attestation with Cedar and KMS, EKS and ECS setup, density maths, and the leak paths confidential mode does not close.
Context and Background
Container isolation has always been a negotiation between density and blast radius. Namespaces and cgroups partition what a process can see, but every container still makes system calls into the same host kernel. Seccomp profiles, AppArmor, and user namespaces shrink that attack surface without removing it. For genuinely hostile code, the industry answer has been an extra layer: a user-space kernel such as gVisor, or a lightweight VM per pod through Kata Containers or Firecracker. We compared those options in depth in our guide to AI agent sandboxes with Firecracker, gVisor and Kata, so this post does not repeat that comparison.
The problem with self-managed microVMs on the cloud is the nested-virtualization tax. An EC2 instance is already a guest of the Nitro Hypervisor. Running Kata or Firecracker inside it historically meant bare-metal instances or nested virtualization, each with cost or performance penalties. Managed services such as AWS Fargate and AWS Lambda solved this internally, but you could not pick instance types, pack many tasks onto one host, or use Capacity Reservations.
A second thread is confidential computing. Hardware trusted execution environments such as Intel TDX, AMD SEV-SNP, and Arm CCA encrypt guest memory so even the host operator cannot read it, and they prove what booted through remote attestation. Our deep-dive on confidential VMs with TDX, SEV-SNP and Arm CCA covers those CPU mechanisms. In Kubernetes, the CNCF Confidential Containers project packages them per pod, which we mapped in our confidential containers on Kubernetes architecture explainer.
AWS has offered its own isolation primitive since 2020: Nitro Enclaves. An enclave carves vCPUs and memory from a parent instance into a locked-down VM with no network, no persistent storage, and only a vsock channel to its parent. It is excellent for a small key-handling job and awkward for anything else. AWS Nitro Sandboxes is, in AWS’s words, “built on the same foundation as Nitro Enclaves”, but designed to run ordinary, unmodified applications. The AWS Compute Blog launch post describes it as “a new Amazon EC2 building block that gives each container the boundary of a hardware-isolated virtual machine.” The EKS integration requires Kubernetes 1.36 or later and is available in all commercial AWS Regions.
My thesis for this post is simple. Most coverage frames AWS Nitro Sandboxes as “faster Kata on AWS.” That misses the point. The real design decision is which party you remove from your trusted computing base, and the two modes answer that question in opposite directions.
How AWS Nitro Sandboxes Work: The Reference Architecture
A Nitro Sandbox is a lightweight virtual machine launched from a parent EC2 instance, using vCPUs and memory the parent contributes. It runs as a first-level guest of the Nitro Hypervisor — not a nested VM — with its own kernel and network stack. The hypervisor enforces the CPU and memory boundary, and the parent sees only I/O buffers the sandbox explicitly shares.

Figure 1: Components on the parent EC2 instance and inside a Nitro Sandbox for an EKS pod, based on the EKS User Guide.
Figure 1 traces a pod from kubelet down to the hardware. On the parent instance, kubelet calls containerd, which hands the pod to a shim process named containerd-shim-nitro-sandbox-v2. The shim drives a Firecracker microVM and exposes virtio-vsock, virtio-blk, and virtio-net devices. Inside the sandbox, an agent called nitro-sandbox-agent runs its own containerd and starts your containers over the guest kernel. The Nitro Hypervisor sits beneath both sides and carries sandbox lifecycle events and runtime notifications.
A first-level guest, not a nested VM
The headline engineering trick is placement. Traditionally a microVM inside an EC2 instance is a guest of a guest. Here the parent asks the Nitro System to create a sibling VM from resources the parent already owns. The EKS User Guide states each sandbox “runs as a first-level guest with direct hardware-assisted virtualization, not through emulation or nested virtualization.”
That placement explains several properties at once. Because the hypervisor, not the parent kernel, owns the sandbox’s page tables, the parent cannot map guest memory. Because the guest is a real VM, it boots its own Linux kernel, so a kernel exploit inside the sandbox compromises only that kernel. And because no second hypervisor layer exists, the virtualization overhead is the same order as any EC2 guest. AWS has not published launch-latency or throughput benchmarks for the primitive, so treat any specific overhead figure you see elsewhere with caution.
One AWS-stated number does exist. The EKS launch post says that warm pools, built on the Kubernetes SIG project agent-sandbox, keep pre-booted VMs ready and can be claimed “in about two seconds.” That is a claim time for a pre-booted VM, not a cold-boot figure.
Resources come from the parent, visibility does not
The parent instance contributes every vCPU and byte of memory the sandbox uses. Memory comes from a pool the parent reserves at boot. Per the EC2 User Guide, each sandbox consumes its own memory plus 2 MiB of that pool, and in confidential mode another 16 MiB per virtual device. AWS recommends at least 256 MiB per sandbox.
Despite supplying the resources, the parent loses visibility. AWS documentation lists what the parent cannot do: read or write guest memory, access CPU register state, forge attestation documents, or decrypt encrypted image layers. What it can still do is carry device traffic and decide when the sandbox runs. That asymmetry — control of resources without access to state — is the foundation of everything else in this post.
This is also how AWS Nitro Sandboxes differ from a plain Firecracker microVM you run yourself. A self-managed Firecracker guest inside a nested-virtualization instance is fully visible to its host kernel; the host can dump its memory at will. A Nitro Sandbox in confidential mode removes that ability in hardware. The EC2 primitive also offers a “Direct mode”, which disables attestation and lets the parent read sandbox memory. AWS describes its trust model as “equivalent to a nested VM” and suggests it only when one trusted party runs both sides, for example non-enlightened guests such as Windows or Android.
Policy lives inside the guest
The third architectural point is where policy is enforced. Every sandboxed pod carries a Cedar policy — Cedar is the open-source authorization language AWS also uses in Amazon Verified Permissions. The policy decides which images may load, which containers may start, whether exec, stdin, and log streaming are allowed, and which mounts are permitted.
Crucially, the agent enforces that policy from inside the guest. A compromised parent cannot simply ignore it, because the parent is not the enforcement point. The policy is also measured into an attestation register, PCR17. If an attacker on the parent swaps in a weaker policy, the measurement changes and any key gated on the original value stays locked. This is the mechanism that makes confidential mode more than a promise.
Networking stays familiar. On EKS, pods keep their own VPC IP through the Amazon VPC CNI. On ECS, each task gets its own elastic network interface in awsvpc mode. Security groups and network policies are enforced on the parent, outside the sandbox. A compromised workload therefore cannot switch them off — a useful property when the guest is the hostile party.
What the agent hands kubelet
Because kubelet sits outside the guest, every interactive feature crosses the boundary. Logs, exec, port-forward, probes, and metrics travel over an internal vsock control channel between the shim and the agent. In isolated mode this is transparent, and AWS says kubectl logs, kubectl exec, and kubectl port-forward work as before. In confidential mode the policy denies several of those channels, because each is a path for data to leave the guest.
The guest also replaces services the pod would normally reach on the host. Instance metadata shrinks to an allow-list: only placement/region, placement/availability-zone, placement/availability-zone-id, services/domain, and services/partition return data, and every other path returns 404. IAM credentials do not come from IMDS at all; EKS Pod Identity delivers them. A quick sanity test from the EKS launch post shows the difference. Inside a sandbox the DMI product name ends in .enclave and disks appear as vda, vdb, vdc. A regular pod on the same node shows nvme0n1 and friends.
The Trust Model: Isolated Sandbox vs Confidential Sandbox
The two modes share one architecture and differ in a single assumption. In isolated-sandbox (ECS: ISOLATED_SANDBOX), the parent instance is trusted and the guest is not. In confidential-sandbox (ECS: CONFIDENTIAL_SANDBOX), the parent is untrusted and the guest becomes the trust boundary. Everything else — policy strictness, encryption, observability — follows from that choice.
Isolated mode protects the node from the workload
Isolated mode is the multi-tenant container isolation answer. The threat is a hostile or compromised container: an AI agent executing generated code, a tenant uploading a plugin, or a pull request whose test suite tries a container escape. The sandbox contains it, so a kernel exploit lands in a throwaway guest kernel rather than the node.
Because the operator is trusted, AWS keeps operations friendly. The EKS docs say the parent “retains full observability and control: exec, stdin, logs, stats, and process listing are all permitted.” The policy does not pin admission fields, so any valid container spec runs. The overlay filesystem is unencrypted “to allow faster pod startup.” IMDS placement metadata, NTP, and Pod Identity credentials are allowed. Isolated mode does not even require you to write a Cedar policy; without one, the sandbox applies a permissive built-in default.
Confidential mode protects the workload from the node
Confidential mode reverses the arrow. The threat is your own cluster administrator, a node administrator, or a compromised parent instance. Examples include a closed-weight model a vendor deploys into a customer’s cluster, regulated data processing, or a key-signing service.
Here the policy “pins every admission field (image digests, args, environment variables, mounts, capabilities, and security settings).” Exec, stdin, and process listing are denied so the parent cannot look inside. The writable layer and emptyDir volumes live on an encrypted overlay built from dm-crypt over dm-integrity. AWS notes the authentication tags stay in guest memory, so the parent cannot roll the layer back by restoring an old snapshot. Image layers can be encrypted with the OCI image encryption specification and decrypted only inside the guest.
The scope is precise. AWS states confidential mode “limits what users with administrative access to your cluster or worker nodes can do,” but “doesn’t change the AWS operator access properties of the Nitro System.” The Nitro System’s no-operator-access design already applies to every EC2 instance. Confidential mode adds protection from your side of the shared-responsibility line.
A threat model table
The table below summarises which attacker each mode stops. It is my synthesis of the EKS security-model documentation, not an AWS-published matrix.
| Threat | Shared runtime (default) | Isolated sandbox | Confidential sandbox |
|---|---|---|---|
| Container escape via host kernel bug | Exposes node and neighbours | Contained in guest kernel | Contained in guest kernel |
| Pod reads a neighbour pod’s memory | Possible after escape | Blocked by Nitro Hypervisor | Blocked by Nitro Hypervisor |
Node admin runs kubectl exec into pod |
Allowed | Allowed by design | Denied by policy |
| Node admin dumps pod memory | Possible | Blocked in hardware | Blocked in hardware |
| Node admin reads writable layer on disk | Possible | Possible, overlay unencrypted | Blocked, encrypted overlay |
| Node admin swaps in a weaker policy | Not applicable | Possible, operator is trusted | Detected, PCR17 changes and KMS refuses |
| Node admin reads Pod Identity credentials | Possible | Possible | Still possible |
| Node admin drops packets or kills the pod | Possible | Possible | Still possible |
| Workload logs its own secrets | Leaks | Leaks | Leaks if logs allowed |
Three rows deserve attention. Denial of service is never prevented; AWS states “no technical mitigation can prevent denial of service.” Pod Identity credentials remain mintable by the parent, so their IAM permissions are effectively shared with the node. And confidential mode cannot save a workload from itself, a point we return to in the gotchas section.
Nitro Enclaves vs Nitro Sandboxes
Because both primitives share a foundation, the naming invites confusion. Enclaves are a narrow, high-assurance room for a small job. Sandboxes are a general-purpose VM boundary for ordinary software. The comparison below draws on the EC2 User Guide and the Compute Blog.
| Dimension | Nitro Enclaves | Nitro Sandboxes |
|---|---|---|
| Intended job | Small, tightly scoped work on highly sensitive data | Share an instance among independent workloads |
| CPU | Full dedicated cores taken from the parent | vCPUs can time-slice cores with the parent |
| Networking | None; vsock to the parent only | Own network stack via virtio-net, plus vsock |
| Storage | No persistent storage | Virtio block devices, EBS, EFS, S3 via clients |
| Applications | Purpose-built enclave images | Unmodified applications and OCI images |
| VMM | Enclave-specific tooling | Firecracker |
| Attestation | NSM attestation document | NSM attestation document in confidential mode |
| Orchestration | Manual or via device plugin | Native EKS runtime class and ECS task setting |
If your job is “hold a private key and sign things”, Nitro Enclaves remains the tighter fit — less surface, no network to misconfigure. If your job is “run this tenant’s whole service”, AWS Nitro Sandboxes is the tool. Note one prerequisite they share: you must enable Nitro Enclaves when you launch the parent instance, and sandboxes run on the instance types that support Enclaves.
Attestation closes the loop

Figure 2: How a confidential pod earns a decryption key. The PCR17 value is predicted in CI before any sandbox exists.
Attestation is often described loosely, so here is the exact sequence from the EKS docs, shown in Figure 2. First, a CI step runs eks-nitro-sandbox-genpolicy --profile confidential manifest.yaml. The tool prints a base64 Cedar policy and the predicted PCR17 value. Second, you write that PCR17 value into an AWS KMS key policy condition, alongside a PCR8 service-name condition. Third, you attach the policy to the pod as the sandbox.amazonaws.com/policy annotation and deploy.
At runtime, the Nitro Secure Module (NSM) inside the sandbox measures the system image and the policy into its platform configuration registers. When the workload calls kms:Decrypt, the request carries an NSM-signed attestation document. KMS checks the measurements against the key policy and releases the data key only on a match.
The two conditions do different jobs. PCR17 pins what the sandbox is allowed to do. PCR8 is the measurement of the certificate that signed the guest image, and the :ServiceName selector compares the signer’s service identity. Setting it to eks.amazonaws.com proves AWS’s EKS Nitro Sandbox service signed the guest image. AWS warns that “gating on PCR17 alone is not sufficient”: a matching policy could otherwise be presented from a guest image AWS did not sign. The selector form also survives AWS rotating its signing certificate, which would break a raw PCR8 hash.
The most important sentence in the whole documentation set is this one: “Attestation without a verifier is a measurement without enforcement.” A confidential pod with no KMS condition is merely an isolated pod with stricter defaults.
Walk-through: Running Sandboxed Pods and Tasks, and Sizing the Fleet
This section turns the trust model into configuration. The commands and field names below come from the EKS User Guide, the ECS API Reference, and the AWS launch posts. Where I have assembled a fragment myself, I say so.
EKS: the one-line opt-in
EKS Auto Mode is the shortest path. AWS states both runtime classes ship with every Auto Mode cluster, with no add-ons, and the RuntimeClass object carries the node selector and toleration that steer pods onto sandbox-capable nodes. The launch post creates a demo cluster like this:
eksctl create cluster --name sandbox-demo --region us-west-2 \
--version 1.37 --enable-auto-mode
kubectl get runtimeclass # lists confidential-sandbox and isolated-sandbox
An isolated pod then needs exactly one extra field. This is the core of EKS pod hardware isolation:
apiVersion: v1
kind: Pod
metadata:
name: untrusted-job
spec:
runtimeClassName: isolated-sandbox
restartPolicy: Never
containers:
- name: runner
image: public.ecr.aws/amazonlinux/amazonlinux:2023
command: ["sh", "-c", "cat /sys/class/dmi/id/product_name; ls /sys/block"]
resources:
requests: { cpu: "2", memory: 1Gi }
limits: { cpu: "2", memory: 1Gi }
For code that must never touch the network, add the annotation sandbox.amazonaws.com/network-isolated: "true". The sandbox then boots with no network device at all — no TAP, no virtio-net, no DNS, no NTP, no IMDS. Because the device is absent rather than filtered, nothing can misconfigure it open. Two consequences follow: HTTP and TCP probes cannot succeed, so use exec probes, and kubectl port-forward stops working. Logs and exec still flow over vsock.
On standard EKS without Auto Mode, you run managed node groups or Karpenter with a sandbox-enabled AMI, which the user guide shows how to build. That is more work, but it is the route for teams that already pin their own AMIs.
EKS: the confidential-sandbox runtimeClassName path
A confidential pod differs in three ways: a different runtime class, a generated policy annotation, and a KMS key policy that checks attestation. The documented example looks like this:
apiVersion: v1
kind: Pod
metadata:
name: my-app
annotations:
sandbox.amazonaws.com/policy: "<base64 policy>"
spec:
runtimeClassName: confidential-sandbox
containers:
- name: main
image: public.ecr.aws/amazonlinux/amazonlinux:2023
command: ["sleep", "3600"]
resources:
limits:
cpu: "1"
memory: 512Mi
The key policy condition that turns measurement into enforcement uses both PCR selectors. The hash below is AWS’s documentation example; yours comes from genpolicy output:
"Condition": {
"StringEqualsIgnoreCase": {
"kms:RecipientAttestation:PCR17": "5dafcce823381ecda1f1f8f16fc9e1992e2b9c1f78efd09bb75713026e07d57600f3fff0d785fd52e236e6ce9d2ae025",
"kms:RecipientAttestation:PCR8:ServiceName": "eks.amazonaws.com"
}
}
The operational catch is ordering. The confidential policy pins the final pod spec, so AWS tells you to generate it “as the last step, after any admission or mutating webhooks” have modified the spec. A sidecar injector that adds a container after policy generation will get the pod denied. Every pinned change — including a new image digest — means a new PCR17 and a KMS policy update. Build both into the same pipeline that renders manifests.
Digest pinning is brittle across rebuilds. The alternative is signature trust: generate the policy with --require-any-signer <signing-profile-ARN> and --skip-image-ref-container <name>. The agent then verifies an AWS Signer Notation signature inside the guest and checks revocation before starting the container. That requires signer:GetRevocationStatus and signer:GetSigningProfile on the pod’s role, and it fails closed. It also needs network access to the Signer endpoint, so it cannot combine with network-isolated pods.
genpolicy also leaves HARDEN comments where a stricter pod spec would allow tighter pinning. Setting readOnlyRootFilesystem: true, allowPrivilegeEscalation: false, runAsNonRoot: true, and dropping ALL capabilities each lets the policy pin more. Treat those comments as a free security review.
ECS: isolation in the task definition
On ECS, the feature is available only on ECS Managed Instances. ECS launches compatible instances running a fully configured Bottlerocket image. You enable nitroEnclavesEnabled on the capacity provider, then set trustedExecutionConfiguration in the task definition. The isolationMode field accepts SHARED (the default), ISOLATED_SANDBOX, or CONFIDENTIAL_SANDBOX. A base64 attestationPolicy is required for the confidential value. The fragment below is my minimal illustration assembled from the API reference, not a complete task definition:
{
"family": "tenant-a-api",
"networkMode": "awsvpc",
"trustedExecutionConfiguration": {
"isolationMode": "CONFIDENTIAL_SANDBOX",
"attestationPolicy": "<base64 policy envelope>"
}
}
Isolated and confidential tasks must use awsvpc networking. Each described task reports its mode in a read-only trustedExecutionSummary field, which is the field to assert on in compliance checks. AWS positions this as the same VM-level, per-task isolation as AWS Fargate, but with your own instance types, multiple tasks per instance, and Capacity Reservations.
ECS storage has its own rules. Each task gets 20 GiB of ephemeral storage, not configurable through ephemeralStorage. The per-instance EBS data volume defaults to 80 GiB and can range from 30 GiB to 16,384 GiB in the capacity provider. ECS only offers a cached image to the next task of the same task definition, never to others, to preserve isolation. Attaching an EBS volume to an individual task is not supported; use EFS for shared persistent data.
Choosing a mode

Figure 3: A decision path for picking a runtime per workload. Hard incompatibilities are checked first, then the trust question.
Figure 3 encodes the order I recommend. Start with hard blockers, because they end the conversation regardless of security preference. GPU and device passthrough are not supported at launch, since Firecracker cannot pass host devices to the guest. hostNetwork: true pods fail to start. In-place resource resize and huge-page requests do not work. If your workload needs any of these, it stays on the shared runtime — or moves to a separate node pool, as discussed in our guide to GPU sharing on Kubernetes for multi-tenant inference.
Next comes the threat question. Is the code untrusted? If not, and the data is not sensitive, the shared runtime with standard hardening is fine. If the code is untrusted but you trust your operators, choose isolated mode. If you must keep data away from operators — or prove to a customer that you cannot see it — choose confidential mode and commit to the KMS work.
Capacity planning with the documented caps
Two density caps apply on EKS. Total vCPUs allocated to sandboxes on a node cannot exceed five times the node’s vCPU count. Separately, the number of sandboxes cannot exceed five times the node’s vCPUs. The EC2 primitive adds a hard ceiling of 896 sandboxes per parent. AWS’s own example for a 4-vCPU node: 20 sandboxes at 1 vCPU, 10 at 2 vCPUs, or 5 at 4 vCPUs.
The cap is not the whole story, because vCPU oversubscription is a scheduling limit, not compute. On SMT instances — most Intel and SMT-enabled AMD types, with two threads per core — core scheduling stops two different sandboxes from sharing sibling threads at the same time. Real compute for sandboxes is therefore “roughly half the advertised vCPUs.” Graviton has one thread per core and is unaffected. AWS advises requesting CPU in multiples of two vCPUs on SMT instances so each sandbox owns whole cores.
Here is a worked, illustrative example. The node is hypothetical and the arithmetic uses only the documented rules. Take a 16-vCPU, 64 GiB, two-threads-per-core instance hosting 1-vCPU agent sandboxes.
| Constraint | Calculation | Limit |
|---|---|---|
| Sandbox count cap | 5 x 16 vCPUs | 80 sandboxes |
| Allocated vCPU cap | 5 x 16 vCPUs, at 1 vCPU each | 80 sandboxes |
| Physical cores for real work | 16 / 2 threads per core | about 8 concurrent busy sandboxes |
| Memory at 512 MiB request | 64 GiB minus OS and kubelet reserve, then divide | well under 80 once reserves and overhead are counted |
The lesson: for bursty agent workloads that mostly wait on model APIs, the 80-sandbox cap might be reachable. For CPU-bound builds, plan around physical cores and use 2-vCPU requests on SMT parts, or prefer Graviton. AWS also notes that “memory limits are typically the binding constraint before vCPU oversubscription.” Each unique container image reserves 16 MiB of RuntimeClass memory overhead. Pods requesting more than 1 GiB see usable memory about 1–2% below their request because the guest kernel needs page tables and bookkeeping. AWS does not publish the full RuntimeClass overhead value in the pages I reviewed, so measure it on your nodes.
Cost is simpler than capacity. AWS states there is no additional charge for AWS Nitro Sandboxes or its EKS and ECS integrations. You pay for the EC2 instances, plus the normal EKS Auto Mode or ECS Managed Instances management fee if you use them. The real cost lever is therefore density: every sandbox you fail to pack is a fraction of an instance you pay for anyway.
Trade-offs, Gotchas, and What Goes Wrong with AWS Nitro Sandboxes
The hardware boundary is strong. The failures cluster around the edges: what crosses the boundary on purpose, what the parent still controls, and Kubernetes features that assumed a shared kernel.

Figure 4: Paths by which data can still leave a confidential sandbox, and the mitigation AWS documents for each.
The workload can leak itself. AWS is blunt: confidential mode “does not protect that data from the workload itself.” Figure 4 maps the documented leak paths. Secrets written to stdout reach the parent if the policy permits ReadLogs. Plaintext on EFS is readable, because the parent can mount the same filesystem with its own IAM identity. Plaintext on EBS is readable, because volumes attach as raw virtio-blk devices — and EBS encryption does not help, since the parent sees decrypted blocks. Runtime-loaded code such as curl | sh can exfiltrate anything. Encrypt inside the guest with an attestation-gated key, and deny logs for pods that handle secrets.
Configuration from the parent is untrusted input. ConfigMaps, Secrets, and projected volumes are content the parent controls. The Cedar policy governs which paths the parent may write, not what it writes. AWS advises baking CA bundles and pinned certificates into the image, which the policy pins by digest. Secrets from the Secrets Store CSI Driver are visible to the parent too.
The parent still owns the plumbing. It writes /etc/hosts, so it can point localhost elsewhere — use 127.0.0.1. It proxies NTP, so wall-clock time is not a security input. It supplies placement metadata, so region and zone can be faked; use KMS key ARNs, not aliases, because the sandbox derives the endpoint from the ARN. It sees DNS, so prefer DNS-over-TLS or DNS-over-HTTPS. And any root process with access to the Firecracker vsock socket can connect to guest-bound ports, which is why network isolation is “not absolute.”
EFS access points are not tenant boundaries. The EFS mount uses the EFS CSI node DaemonSet’s IAM identity, shared by every pod on the node. A compromised pod that knows another access point ID on the same filesystem can mount it. Untrusting tenants each need their own filesystem, mounted with the iam option, plus a filesystem policy that requires IAM authorisation.
Pod spec authorship is a privileged act. The feature is designed to run untrusted images, not untrusted pod specs. Whoever writes the spec chooses the image and mounts. Restrict sandbox runtime classes with RBAC and admission control.
Kubernetes features change shape. hostPID and hostIPC scope to the sandbox. hostPath resolves inside the guest. User namespaces (hostUsers: false) are not supported on isolated-sandbox nodes. An EBS volume cannot be shared by two pods, so use ReadWriteOncePod. Running-volume expansion is unsupported. Ephemeral storage reports as zero to kubelet, so set explicit limits. CPU Manager static pinning has no effect. Port-forward cannot reach loopback-only servers.
Defaults throttle noisy tenants. Each pod gets 4,096 simultaneous outbound connections per IP family, adjustable from 64 to 65,536, and 100 DNS queries per second, up to 512. High-fan-out crawlers or agents will hit these first.
Auto Mode will not place every pod. Sandbox pods stay Pending when the NodeClass uses FIPS AMIs, the matching AMI is a GPU or Neuron variant, or the instance type is multi-NUMA or not yet validated. At launch, r5a, r5ad, and m5ad were temporarily excluded on Auto Mode. There is no snapshot, restore, pause, or live migration, and stopping the parent stops its sandboxes.
Practical Recommendations
Treat AWS Nitro Sandboxes as two products that share a brand. Isolated mode is a near-free upgrade for any untrusted-code workload already on EKS Auto Mode or ECS Managed Instances: one field, no policy authoring, and familiar debugging. Confidential mode is a project. It needs a policy pipeline, KMS key policies with two attestation conditions, encrypted images, and an application audit for self-inflicted leaks. Do not adopt it to tick a box; adopt it when a named party must be excluded from your trusted computing base.
For AI agents and CI runners, start with isolated mode plus the network-isolated annotation where code needs no egress. Where it needs egress, use a hostname-based policy such as the EKS Auto Mode ApplicationNetworkPolicy shown in AWS’s coding-agent example. Remember that hostname rules admit the whole host; a scoped token must limit what the agent can push. For a wider survey of agent execution options, our piece on managed agent sandboxes versus self-hosted ones frames the build-or-buy decision.
For capacity, plan on physical cores, not vCPUs, on SMT instances, and request CPU in pairs. Prefer Graviton for CPU-dense sandbox fleets. Load-test your own launch and claim latency; AWS has published only the roughly two-second warm-pool claim.
A short checklist before production:
- Pick the mode per workload from the threat it must stop, and record that decision.
- Restrict who may create pods or task definitions that use sandbox runtimes.
- For confidential pods, generate the policy last in CI and update PCR17 in KMS in the same pipeline.
- Always pair
PCR17withPCR8:ServiceNameset toeks.amazonaws.com. - Deny
exec,stdin, and logs for pods handling secrets; bake trust anchors into the image. - Encrypt before writing to EFS or EBS, and give untrusting tenants separate EFS filesystems.
- Keep GPU,
hostNetwork, and huge-page workloads on separate, non-sandboxed node pools.
Frequently Asked Questions
What are AWS Nitro Sandboxes?
AWS Nitro Sandboxes is an EC2 capability, launched in November 2026, that runs a container, EKS pod, or ECS task inside its own lightweight virtual machine beside a parent EC2 instance. The parent supplies vCPUs and memory, but the Nitro Hypervisor enforces the boundary in hardware. Each sandbox is a first-level guest with its own kernel and network stack, and it uses Firecracker as the VMM. There are two modes on EKS and ECS: isolated, which trusts the node, and confidential, which does not and adds attestation.
What is the difference between Nitro Enclaves vs Nitro Sandboxes?
Nitro Enclaves is a narrow primitive for small, highly sensitive jobs. It takes dedicated cores from the parent, has no network and no persistent storage, and talks only over vsock. Nitro Sandboxes shares the same foundation but runs unmodified applications. Its vCPUs can time-slice with the parent, it has virtio network and block devices, and it supports EBS, EFS, and S3. Both use the Nitro Secure Module for attestation, and sandboxes require Nitro Enclaves to be enabled on the parent instance.
How do I enable a confidential-sandbox runtimeClassName on EKS?
You need Kubernetes 1.36 or later. With EKS Auto Mode, the confidential-sandbox and isolated-sandbox runtime classes already exist. Generate a Cedar policy from your final manifest with eks-nitro-sandbox-genpolicy --profile confidential. Add the output as the sandbox.amazonaws.com/policy annotation, set runtimeClassName: confidential-sandbox, and deploy. Then configure your KMS key policy with kms:RecipientAttestation:PCR17 set to the predicted value and PCR8:ServiceName set to eks.amazonaws.com.
Do Nitro Sandboxes cost extra?
No. AWS states there is no additional charge for Nitro Sandboxes or for the EKS and ECS integrations. You pay for the underlying EC2 instances. If you use EKS Auto Mode or ECS Managed Instances, their standard management fees still apply. The practical cost effect comes from density: sandboxes add per-pod memory overhead and, on SMT instances, roughly halve the compute available for sandboxed work. That can mean more or larger instances than an equivalent shared-kernel deployment.
Can I run GPU workloads in a Nitro Sandbox?
Not at launch. AWS documents that GPU and other device passthrough are unsupported, because Firecracker does not pass host devices into the guest. AWS Nitro Sandboxes can run on some accelerated instance families, such as G5, G6, and P3dn, but only for CPU workloads. On EKS Auto Mode, a sandbox node is not provisioned when the matching AMI is a GPU or Neuron variant. Keep GPU inference on a separate node pool with its own sharing and isolation strategy.
Does confidential mode protect my data from AWS?
Confidential mode is about your side of the shared-responsibility line. AWS says it limits what your cluster and node administrators can do, but “doesn’t change the AWS operator access properties of the Nitro System.” Those Nitro properties, which already restrict AWS operator access, apply to every EKS worker node. In confidential mode, the parent instance cannot read sandbox memory, forge attestation, or decrypt encrypted image layers. It can still deny service, observe unencrypted traffic, and mint Pod Identity credentials.
Further Reading
- AI agent sandboxes compared: Firecracker vs gVisor vs Kata — the isolation-technology comparison this post builds on.
- Confidential containers on Kubernetes: architecture guide — the CNCF approach to per-pod TEEs and attestation.
- GPU sharing on Kubernetes: MIG vs MPS vs time-slicing vs vGPU — isolation options for the GPU workloads sandboxes cannot host yet.
- AWS Compute Blog: Nitro Sandboxes launch post — the primary announcement and Enclaves comparison.
- Amazon EKS User Guide: sandboxing with isolated and confidential pods — runtime classes, policy, attestation, and limits.
By Riju — about
