Prerequisites
- A Porter project
- An AWS cluster where you want to run sandboxes. We recommend creating a new AWS cluster for sandboxes so sandbox workloads are isolated from your other running workloads.
Enable sandboxes
Enable sandboxes from the Sandbox tab
Sandboxes can only be enabled on AWS clusters.In the Porter Dashboard, navigate to the Sandbox tab for the AWS cluster where you want to run sandboxes and click Enable sandboxes.

Install a Sandbox SDK in your application
Add either the Python or TypeScript Sandbox SDK to the application that will create and manage sandboxes.

Write your first sandbox call
In your application code, create a sandbox, execute a command, read the output, and terminate the sandbox when the work is done. The examples below show the smallest end-to-end flow.
Calling from outside the cluster
The SDK connects to the in-cluster Sandbox API automatically when your application runs as a Porter Application in the same cluster where sandboxes are enabled. If you need to invoke sandboxes from outside that cluster, configure the SDK with a Porter API token. You can create an API token from Settings > API tokens in the Porter Dashboard. Creating API tokens requires admin permissions.Python quickstart
Install the SDK in your application image:TypeScript quickstart
Install the SDK in your application image:Use tags to identify sandboxes
Tags make it easier to find sandboxes created by a workflow:Next steps
- Use the sandbox CLI guide to list, inspect logs, exec into, and terminate sandboxes.
- Use the Python Sandbox SDK quickstart for Python services.
- Use the TypeScript Sandbox SDK quickstart for Node.js and TypeScript services.

