Skip to content

Sandboxes

Isolated machines started from a container image, for running commands and holding files, that suspend when idle and resume on the next call.

Updated View as Markdown

A sandbox is its own virtual machine with its own kernel, started from a container image in Container Registry. It has a disk that lasts until you delete the sandbox. You run commands in it, read and write its files, and suspend it when it has nothing to do: a suspended sandbox keeps its memory and its files, and resumes where it stopped.

What you can do

  • Run commands. A one-shot command answers with its output and exit code. An interactive command streams stdin and output, with a terminal if you ask for one.
  • Read and write files by absolute path, up to 5 GiB each. See Files.
  • Suspend and resume. A sandbox suspends by itself after its idle time, and the next command or file call resumes it. See Lifecycle.

How you reach it

With Where
Console Sandboxes: the list, a sandbox’s page with a terminal, and create.
CLI ezgh sandboxes.
API https://sandboxes.ezghcloud.com. See create a sandbox and run a command.

A sandbox belongs to a project. Its ID starts with sbx_.

Permissions

Policy Allows
SandboxesFullAccess Everything here.
SandboxesReadOnlyAccess Listing and viewing sandboxes. ReadOnlyAccess includes the same.

View access doesn’t include files or commands: reading a file needs sandboxes.sandboxes.readFile, which only SandboxesFullAccess has.

Action Allows
sandboxes.sandboxes.list List sandboxes
sandboxes.sandboxes.get View sandboxes
sandboxes.sandboxes.create Create sandboxes
sandboxes.sandboxes.suspend Suspend sandboxes
sandboxes.sandboxes.resume Resume sandboxes
sandboxes.sandboxes.stop Stop sandboxes
sandboxes.sandboxes.start Start sandboxes
sandboxes.sandboxes.delete Delete sandboxes
sandboxes.sandboxes.exec Run commands in sandboxes
sandboxes.sandboxes.readFile Read files in sandboxes
sandboxes.sandboxes.writeFile Write files in sandboxes

Creating a sandbox also needs permission to pull its image, and bots.pass on its bot when it has one.

Audit

Trails records creating, suspending, resuming, stopping, starting and deleting a sandbox. Running a command, reading a file and writing a file are recorded only when the call is refused. Command text, command output, environment values and file contents are never recorded.

What a sandbox doesn’t have

  • Inbound connections. A sandbox has no address of its own and nothing can connect to it. It makes outbound connections only.
  • Attached volumes. Its disk is the only storage it has.
  • A private network. It isn’t in a VPC and can’t reach private addresses in one.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close