Member-only story
Running Python App on AWS Nitro Enclaves
What is AWS Nitro Enclaves
AWS Nitro Enclaves is an isolated compute environment running beside the EC2 instance. It uses the CPU and memory resources from your EC2 instance, but it is isolated from the instance on the hypervisor level so that your instance cannot access the enclave even on the OS-level. The only way you can communicate with the enclave is through the vsock channel.

What’s that mean?
To better understand the concept, we can treat the enclave as a docker container. We can bake our custom applications into an image and run it in the enclave just as we run docker image in a container.
The thing different is that you cannot access this special container’s console, files, metrics, etc. It doesn’t have a network interface nor persistent storage too.
The only thing you can do with it is:
- Running application
- Communicate with the outside world through the dedicated socket tunnel.