Overview
BYOC on AWS has two deployment modes. Both run sandboxes on executors in your own AWS account and keep your project bucket in your account. They differ in who runs the Sandbox Proxy, the component that terminates sandbox traffic and forwards it to an executor.Compute in your network
Compute and ingress in your network
Choose a deployment mode
Before you begin
Tensorlake requirements
You need a Tensorlake project with Self-hosted Compute enabled. You also need permission to change the project settings and create a project-admin API key. If the Self-hosted Compute page is not available, contact Tensorlake. The same project-admin API key can prepare the Sandbox Proxy and enroll the first executor. Treat the key as a secret. Do not save it in an EC2 user-data script.AWS account requirements
Prepare these resources in the AWS Region where you want to run sandboxes. Both modes need:- A VPC.
- An S3 bucket for runtime data, built images, and durable sandbox snapshots.
- An EC2 instance profile that can use the project bucket.
- Capacity for at least one supported bare-metal EC2 instance:
i7i.metal-24xlori7i.metal-48xl.
- An EKS cluster.
- The AWS Load Balancer Controller, version
2.7.2or later. - An IAM role that gives the controller permission to create an AWS Network Load Balancer (NLB), target groups, and security-group rules.
- A public DNS zone for the sandbox domain.
- An AWS Certificate Manager (ACM) certificate for the sandbox domain.
Sandbox base domain
If you run the ingress, choose the base domain before you create certificates or manifests. Every sandbox receives a subdomain below this base domain. For example, a base domain ofsandboxes.customer.example produces URLs such as
https://<sandbox-id>.sandboxes.customer.example.
The public endpoint must be an HTTPS origin. Do not add a port or path.
Tensorlake provides the domain in the compute-only mode.
1. Prepare project storage
Use a dedicated bucket for the project. It is the durable home for sandbox state, and executors write built sandbox images and snapshots into it. Keeping the bucket in the executor Region reduces latency and AWS data transfer costs. Block public access to the bucket. Enable encryption. If you use an AWS Key Management Service (AWS KMS) customer-managed key, give the executor instance role permission to use that key. The executor instance role needs these S3 permissions for the bucket:
The enrollment preflight writes, reads, and deletes a small object under each
derived storage path. This test stops the installation before a sandbox starts
if the instance role cannot use the storage.
Attach the role through an EC2 instance profile. Do not put static AWS access
keys on the host. The Sandbox Proxy does not need this role or any other S3
permission.
Open the project settings in Tensorlake Cloud.
Find Node configuration and set the bucket URI:
2. Prepare your network
Subnet layout
If using VPC CIDR10.90.0.0/16, you can set up this subnet layout, one
subnet per Availability Zone:
If you peer with Tensorlake, use the
10.90.0.0/16 range. Tensorlake
standardizes on it so that every peered deployment shares one network layout.
Give each executor subnet its own route table, because you add return routes to
them later.
If you run the ingress, tag all three public subnets with
kubernetes.io/role/elb=1 so the AWS Load Balancer Controller can select them
without relying on route-table discovery. See the
Amazon EKS NLB requirements.
Outbound access
Allow outbound TCP443 from the executor hosts, and from the EKS nodes if you
run the ingress, to Tensorlake services and required AWS services. The EKS nodes
must pull the public Sandbox Proxy image from public.ecr.aws. The executor must
reach EC2 instance metadata through IMDSv2 and must reach the configured S3
bucket.
Never expose executor ports to the internet in either mode. mTLS means mutual
Transport Layer Security: both endpoints use certificates to verify each other.
3. Connect your deployment mode
Complete the section for the mode you chose. Do not combine them.Connect compute in your network
Send your account details
Give Tensorlake these values through your support channel:
The executor subnet ranges are the destinations Tensorlake routes to. List the
exact subnets, not the whole VPC range.
Receive the onboarding packet
Tensorlake creates the peering connection from its side and sends you a packet with these fields:
Verify the account, VPC, ranges, and ports before you accept anything.
Accept the peering connection
active.
Route return traffic
Add a route in all three executor subnet route tables for eachprovider_node_cidrs value, with the peering connection as the target. Traffic
that arrives from the proxy has no return path until you do.
Allow the proxy into the executor security group
Allow eachprovider_node_cidrs value into every executor security group on
TCP 5565 and TCP 8095-8097.
Allow the /27 node ranges only. Do not allow a pod range, and do not allow the
whole Tensorlake VPC range. If restrictive network ACLs protect the executor
subnets, allow both request and return traffic there as well.
Connect compute and ingress in your network
Create the load balancer security group
The public NLB terminates TLS and sends traffic to the Sandbox Proxy pods.
The generated Service asks the AWS Load Balancer Controller to manage the
matching backend security-group rules. The controller IAM role must include
permission to add and remove those rules.
Allow the proxy into the executor security group
Allow traffic from the Sandbox Proxy pod network or security group to the executor security group:Create the public certificate
Request an ACM certificate in the same AWS account and Region as the NLB. Add both names to the certificate:ISSUED.
Prepare the Sandbox Proxy
The preparation script creates the customer-specific mTLS certificate, two SSH key pairs, and a local Kustomize overlay. Kustomize is a Kubernetes manifest customization tool. The script creates files only in the output directory. It does not change your cluster or AWS account. Download and run the script:Set the SSH proxy public key
In the project settings in Tensorlake Cloud, set SSH proxy public key to the content of this generated file:Deploy the Sandbox Proxy
Confirm the active Kubernetes context:443
uses pod port 9080. The listener on port 22 uses pod port 2222.
Create DNS records and activate the endpoint
Create two public DNS alias or CNAME records. Point both records to the NLB hostname:Hostname test.sandboxes.customer.example does match certificate.
4. Launch the first executor
Launch a bare-metal EC2 instance with Ubuntu24.04. Attach the instance
profile from the storage step. The host must expose /dev/kvm because
Tensorlake uses hardware virtualization to isolate sandboxes.
The instance must also have local NVMe instance storage. Enrollment formats
those disks and mounts them at /mnt/data, which holds container images,
sandbox images, and the local snapshot cache. Amazon EBS volumes are never used
for this, so an instance type without local NVMe cannot run sandboxes.
These instance types meet both requirements:
5. Enroll the executor
In Tensorlake Cloud, open Self-hosted Compute, select Add node, and copy the bootstrap command. It has this form:6. Verify the complete path
Install the Tensorlake CLI if thetl command is not available:
22 is enabled:
Add more executors
Each executor needs its own EC2 instance and enrollment identity. Launch another supported host with the same network and instance-profile configuration. Then run a new command from Self-hosted Compute → Add node. The project storage and Sandbox Proxy settings apply to all executors in the project. You do not need another proxy deployment or peering connection for each host.Updates and key rotation
The provisioner runs as a service on every enrolled executor. It checks Tensorlake for new approved profiles and applies complete updates. A failed update keeps the last valid revision active. If you run the ingress, rotate the Sandbox Proxy mTLS and SSH keys by runningprepare.sh again with a new output directory. Review and apply the new
resources. The certificate fingerprint starts a rolling pod update. Then replace
SSH proxy public key with the new outbound.key.pub value.
Keep the previous output directory in secure storage until the rollout and
end-to-end test pass.
Troubleshooting
Both modes:
Compute in your network:
Compute and ingress in your network: