porter sandbox contains commands for listing, inspecting, executing commands in, and terminating sandboxes in the currently selected Porter project and cluster.
Prerequisites
- You’ve logged in to the Porter CLI after running porter auth login
- You’re connected to the correct project by running porter config set-project
- You’re connected to the correct cluster by running porter config set-cluster
- Sandboxes are enabled on the selected AWS cluster
porter config or pass --project and --cluster.
porter sandbox create
Creates a sandbox from a container image in the current project and cluster.
Usage:
Use the positional form after
-- for common one-shot commands. Use --command and --arg when scripting individual argv elements.
Volume values can be volume names or volume IDs. The CLI resolves names first, then falls back to treating the value as an ID.
Sandbox names currently cannot be reused, even after the sandbox is terminated. Omit --name only for one-off sandboxes where you do not need stable lookup later.
The sandbox runs as long as its main process. When the process exits, the sandbox moves to succeeded or failed and stops accepting exec calls, so pass a long-running command if you plan to exec into the sandbox. See sandbox lifetime.
porter sandbox list
Lists sandboxes in the current project and cluster. The command auto-paginates through the API and sorts results most-recent-first.
Usage:
Phases:
Output formats:
Plain output includes these columns:
porter sandbox exec
Runs a command in a running sandbox, identified by name. Non-interactive exec prints stdout and stderr; interactive exec opens a shell session.
Usage:
Do not combine
--command with positional command arguments.
Exit codes:
Only
running sandboxes accept exec calls.
porter sandbox logs
Fetches and prints a batch of log lines for a sandbox. By default, the CLI requests logs from the last hour with a limit of 500 lines.
Usage:
Each rendered log line uses this format:
porter sandbox terminate
Terminates one sandbox by name, or terminates many sandboxes with --all.
Usage:
Behavior:
porter sandbox volume
Manages persistent volumes that sandboxes can mount at launch. Create a volume first, then reference it from porter sandbox create with --volume <mount_path>=<volume-ref>, where volume-ref is a volume name or ID.
porter sandbox volume list
Lists sandbox volumes in the current project and cluster, sorted most-recent-first.
Usage:
Volume phases:
Output formats:
Plain output includes these columns:
porter sandbox volume create
Creates a persistent volume on the current cluster. The volume name may contain lowercase letters, numbers, and hyphens, and must start and end with a letter or number. Omit the name only for one-off volumes where you do not need stable lookup later.
Volumes start in the pending phase. Sandboxes that mount them wait for the underlying claim to bind, so porter sandbox create does not need a separate wait step.
Volume names must be unique within a cluster for the lifetime of the volume. After a volume is deleted, its name can be used again.
Usage:

