# You need to have the docker image accesible in your running local registry# Or indicate the full docker image URL to access the imagenitro-clibuild-enclave--docker-uri<docker-img>:<tag>--output-filenitro-img.eif
# Restart the service so the new default values applysudosystemctlstartnitro-enclaves-allocator.service&&sudosystemctlenablenitro-enclaves-allocator.service# Indicate the CPUs and memory to givenitro-clirun-enclave--cpu-count2--memory3072--eif-pathhello.eif--debug-mode--enclave-cid16
print(f"Connection opened by cid={remote_cid} port={remote_port}")
while True: buf = conn.recv(64) if not buf: break
print(f"Received bytes: {buf}")
</details>
<details>
### AWS Nitro Enum
#### EC2 Nitro Instances
Nitro instances are a new hypervisor for EC2 instances that enables better performance and security. Nitro instances use Nitro cards to offload tasks from the main CPU, improving overall performance.
#### Nitro API Endpoints
- `nitro-enclave` - Used for launching EC2 instances with Nitro Enclaves.
- `nitro-security` - Used for managing Nitro Security Groups.
- `nitro-smartnic` - Used for managing Nitro SmartNICs.
#### Nitro Security Groups
Nitro Security Groups are used to control traffic to and from Nitro-based instances. They act as a firewall controlling inbound and outbound traffic.
#### Nitro SmartNIC
Nitro SmartNICs are network interface cards that offload network processing from the main CPU. They improve network performance and reduce the load on the main CPU.
#### Nitro Enclaves
Nitro Enclaves are isolated environments for sensitive data processing. They provide a secure environment for processing confidential data within an EC2 instance.
</details>
```bash
# Using socat
socat VSOCK-LISTEN:<port>,fork EXEC:"echo Hello from server!"