AWS Nitro Enclaves bring confidential computing to every EC2 instance — enabling enterprises to run isolated, trusted workloads on AWS infrastructure without trusting AWS operators, EC2 hypervisors, or other processes on the same host. Unlike other TEE implementations that require specialised hardware purchases, Nitro Enclaves are available on virtually any EC2 instance type using Amazon Linux 2 or 2023, making confidential computing accessible at enterprise cloud scale. This production guide covers architecture, setup, and enterprise deployment patterns.
What Are AWS Nitro Enclaves?
AWS Nitro Enclaves are isolated compute environments created within an EC2 instance that are protected from the parent EC2 instance itself. Code and data inside a Nitro Enclave cannot be accessed by the EC2 operating system, other applications, operators, or AWS itself — the enclave is isolated using the Nitro hypervisor's hardware virtualisation capabilities.
Nitro Enclaves Architecture
- Enclave runs as a separate VM — completely isolated from parent EC2 OS
- No SSH, no shell access, no persistent disk — isolated by design
- Only communication channel: VSOCK socket to parent EC2 instance
- Memory and CPU are dedicated from the parent instance's allocation
- Enclave requests signed Attestation Document from Nitro Security Chip
- Document contains: PCR measurements (enclave image hash), public key, instance metadata
- AWS KMS integrates natively — only release keys to enclaves that match specific PCR values
- KMS Decrypt API supports
recipientparameter — keys decrypted inside enclave only - KMS key policy conditions:
kms:RecipientAttestation:PCR0ties decryption to specific enclave image - Even if EC2 instance is compromised, KMS keys never leave the enclave
- Build enclave as a Docker image, convert to EIF using Nitro CLI
- EIF build process generates PCR measurements — record these for KMS key policy
- Integrate EIF building into your CI/CD pipeline — enclave images are versioned artefacts
Enterprise Use Cases for Nitro Enclaves
Production Setup Guide
Launch EC2 instance with --enclave-options 'Enabled=true' or enable via console. Minimum: c5.xlarge or m5.xlarge (4 vCPU/8GB minimum — enclaves share parent resources). Install Nitro Enclaves CLI: sudo yum install aws-nitro-enclaves-cli on Amazon Linux 2/2023. Configure enclave allocator: set CPU and memory allocation for the enclave in /etc/nitro_enclaves/allocator.yaml. Integrate into your infrastructure-as-code (Terraform or CloudFormation).
Package your application as a Docker image with minimal attack surface (distroless or Alpine base). Build EIF: nitro-cli build-enclave --docker-uri myapp:latest --output-file myapp.eif. Record the PCR0 value (enclave image measurement) — you'll need this for KMS key policies. Integrate EIF building into your CI/CD pipeline — treat EIF files as signed release artefacts.
Add attestation condition to your KMS key policy: "kms:RecipientAttestation:PCR0": "sha384:EXPECTED_PCR0_VALUE". This ensures KMS only decrypts data for your specific enclave image — any modification to the enclave code changes the PCR0 and revokes access. Test with nitro-cli run-enclave --debug-mode before removing debug mode in production.
Our software development and DevOps teams design and deploy Nitro Enclave architectures for enterprises requiring confidential computing on AWS — from key management systems to confidential AI inference. Book a free advisory session to scope your Nitro Enclaves deployment.