> ## Documentation Index
> Fetch the complete documentation index at: https://www.ravion.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Execution environments

> Reference for every execution environment setting, including network, sandbox pool, instance types, idle host reserve, maxHosts, and budget, generated from the Ravion API schema.

An execution environment is where Ravion runs your work in one AWS account and region. Pipeline steps, module builds and [GitHub Actions jobs](https://www.ravion.com/docs/github-actions/runners.md) that target it run on EC2 runners or [sandbox](https://www.ravion.com/docs/concepts/sandboxes.md) hosts in its VPC.

Each environment sets:

* **Network**: the VPC, subnets, and security group that runners and sandbox hosts launch into.
* **Sandbox pool**: how the environment's sandbox hosts are sized, bought, kept ready, and limited.
* **Budget**: an optional spending limit for each billing period.

## Change settings

You can change settings in the dashboard, with the CLI, or through the API. All three use the fields in the [settings reference](#settings-reference).

> [tab] Dashboard
>
> Go to [**Settings / Execution environments**](https://app.ravion.com/org/settings/execution-environments), choose the environment, then open **Config**.

> [tab] CLI
>
> Read the current `sandboxes` settings, merge in your changes, then send the complete object back:
>
> ```bash theme={null}
> sandboxes=$(ravion execution-environment get ci-builders --json \
>   | jq -c '.sandboxes + {performanceProfile: "BALANCED", maxHosts: 20}')
> ravion execution-environment update ci-builders --sandboxes "$sandboxes"
> ```
>
> This keeps every sandbox setting you don't change.
>
> Replace `ci-builders` with the ID or given ID of your execution environment. See the [`ravion execution-environment`](https://www.ravion.com/docs/cli/reference/execution-environment) reference for every command.

> [tab] API
>
> Send a `PATCH` to `/execution-environments/{id}` with the fields to change. See the [API reference](https://www.ravion.com/docs/api-reference/overview.md).

> [!WARNING]
>
> `sandboxes` is replaced as a whole. A patch that sends `sandboxes` drops any sandbox setting the patch leaves out, which then falls back to the default. To change one setting, read the environment first and send its complete `sandboxes` object with your change. Omit `sandboxes` to leave the pool as it is.

> [!TIP]
>
> We recommend keeping the sandbox defaults. Any setting you leave unset picks up each improvement to the defaults automatically. The current defaults are returned in the read-only `sandboxDefaults` field when you read an environment.

### Dashboard labels

| Dashboard label | Field |
| - | - |
| **Name** | [`name`](#param-name) |
| **Given ID** | [`givenId`](#param-given-id) |
| **AWS Account** | [`awsAccountId`](#param-aws-account-id) |
| **Region** | [`region`](#param-region) |
| **VPC** | [`vpcId`](#param-vpc-id) |
| **Subnets** | [`subnetSelection`](#subnetselection) |
| **Security Group** | [`securityGroupId`](#param-security-group-id) |
| **Performance profile** | [`sandboxes.performanceProfile`](#param-performance-profile) |
| **Machine types** | [`sandboxes.instanceTypes`](#sandboxinstancetype) |
| **Use spot hosts for interruptible steps** | [`sandboxes.capacityTypes`](#param-capacity-types) includes `SPOT` |
| **Idle hosts to keep running** | [`sandboxes.reservePolicy`](#sandboxreservepolicy) |
| **Only during working hours** | [`sandboxes.reservePolicy.workingHours`](#param-working-hours) |
| **Max hosts** | [`sandboxes.maxHosts`](#param-max-hosts) |
| **Allow public repositories** | [`sandboxes.allowPublicRepositories`](#param-allow-public-repositories) |
| **GitHub Actions artifact storage** | [`sandboxes.githubActionsArtifactStorage`](#param-github-actions-artifact-storage) |
| **Budget per billing period** | [`budget.limitUsd`](#param-limit-usd) |
| **Limit spending on this environment** | [`budget.enforce`](#param-enforce) |
| **Interrupt running jobs when budget is reached** | [`budget.killRunningJobs`](#param-kill-running-jobs) |

[`sandboxes.maxHostAgeHours`](#param-max-host-age-hours) has no dashboard control. Set it with the CLI or API.

## Settings reference

This reference is generated from the Ravion API schema. It lists the fields you can set. Read-only fields that the API also returns, such as `id`, `sandboxDefaults`, and `budgetStatus`, are omitted.

## Legend

| Notation | Meaning |
| - | - |
| `T[]` | Array of `T` |
| `map<string,T>` | Object keyed by strings with `T` values |
| `enum[a,b]` | One of the listed values |
| `A \| B` | One of several types |
| \~template | Field accepts `<< ... >>` template expressions |

## ExecutionEnvironment

An execution environment in one AWS account and region. Pipeline steps, module builds, and GitHub Actions jobs that target it run on EC2 runners or sandbox hosts in its VPC.

**givenId** `string` *required*

User-provided execution environment identifier. Must be unique within organization.

*(minLen:1)*

**name** `string` *required*

Display name shown in the dashboard.

*(minLen:1)*

**region** `string` *required*

AWS region the environment runs in. Set at creation; it can't be changed.

*(minLen:1)*

**type** `enum` *required*

The cloud the environment runs in. `AWS` is the only type.

Allowed values: `AWS`

**sandboxes** `SandboxPoolConfig`

Sparse overrides for the sandbox defaults. Send `{}` to enable a pool that inherits global defaults, `null` to remove it, or omit it on a patch to leave the pool as it is.

See: [SandboxPoolConfig](#sandboxpoolconfig)

**budget** `Budget`

Spending limit. Send null to remove it, or omit it on a patch to leave it as it is.

See: [Budget](#budget)

**vpcId** `string` *required*

VPC the environment's EC2 runners and sandbox hosts launch into, such as `vpc-0123456789abcdef0`. It must be in `awsAccountId` and `region`.

*(minLen:1)*

**subnetSelection** `SubnetSelection`

The VPC subnets EC2 runners and sandbox hosts launch into. Sandbox hosts launch into one per availability zone. Each EC2 runner launches into one of them, in a zone that offers its instance type, picked at random so runners spread across the zones; when AWS refuses the launch in that zone it retries in another zone of the selection. A selection the VPC has no subnet for, or naming a subnet outside it or one with no route to an internet or NAT gateway, is refused. Omit it on create for the VPC's public subnets, or its private ones when it has no public subnet. Omit it on a patch to keep the stored selection; a patch that changes `vpcId` without one resets it to that default for the new VPC, since its subnets belonged to the old VPC. Always present in a response: an environment saved before subnet selections existed shows the one its old subnet implies — its VPC's public subnets for a public subnet, its private ones for a private subnet.

See: [SubnetSelection](#subnetselection)

**securityGroupId** `string` *required*

Security group attached to the environment's EC2 runners and sandbox hosts, such as `sg-0123456789abcdef0`. It must belong to `vpcId`, and it must allow outbound HTTPS so runners can reach Ravion, GitHub, and AWS APIs. Runners need no inbound rules.

*(minLen:1)*

**awsAccountId** `string` *required*

AWS account the environment runs in. Set at creation; it can't be changed.

*(minLen:1)*

## SandboxPoolConfig

Sparse overrides for the global sandbox-pool defaults. An empty object enables a pool that inherits the current defaults.

**performanceProfile** `enum`

Choose Low cost, Balanced, High performance, or Ludicrous. Controls idle capacity, automatic CPU/memory sizing, and CPU headroom on shared hosts. Low cost allows full packing; Balanced leaves 10% CPU headroom. Both allow smaller CPU reservations when fuzzy placement is enabled. High performance and Ludicrous reserve the full target CPU and leave 20% and 60% headroom, respectively. Leaving headroom can increase compute cost. High performance retains up to two recently used idle hosts for 120 and 30 seconds; Ludicrous retains up to three for 300, 120, and 60 seconds. When the pool lists no instance types, High performance and Ludicrous launch only the newest EC2 instance generation of each processor that Ravion offers (today 8th generation, such as c8id, m8id, r8id, c8i, m8i, and r8i; it moves forward as newer generations are added), including when Spot capacity is short and the pool falls back to On-Demand; in a region that sells no latest-generation type they use the newest generation it does sell. Listed instance types are always used as listed. This does not launch extra idle hosts or change your configured idle host reserve. Explicit job sizes and safety limits are unchanged. Omitted or previously unset preferences automatically become Balanced.

Allowed values: `LUDICROUS` | `HIGH_PERFORMANCE` | `BALANCED` | `LOW_COST`

**maxHostAgeHours** `integer`

The oldest a running host may get before it is drained for a fresh one, whatever template it launched from. Omitted, it defaults to 168 hours (a week).

*(format:int32,min:1,max:8760)*

**reservePolicy** `SandboxReservePolicy`

How many hosts the pool keeps ready. Omitted, it uses the current global default.

See: [SandboxReservePolicy](#sandboxreservepolicy)

**capacityTypes** `enum[ON_DEMAND,SPOT][]`

The markets the pool buys hosts in. `ON_DEMAND` is required: a step whose `infrastructure.interruptible` is false or omitted runs only on an on-demand host. With `SPOT`, an interruptible step that finds no on-demand room already running is placed on a spot host, billed at the Spot price; AWS can reclaim a spot host with two minutes' notice, and the step is then run again on another host, the last of three attempts on on-demand. Omitted, it uses the current global default.

**allowPublicRepositories** `boolean`

Allow GitHub Actions jobs from public repositories and forks to use this sandbox pool. Disabled when omitted.

**githubActionsArtifactStorage** `enum`

Where GitHub Actions artifacts uploaded on this pool are stored. `S3` keeps them in a `ravion-artifacts-` bucket in your AWS account, so uploads and downloads stay inside AWS; they no longer appear on GitHub, and each job's log lists Ravion download links instead. The `github-pages` artifact always goes to GitHub. Only jobs on this pool's runners find artifacts kept in S3: GitHub-hosted jobs, other pools, `gh run download`, GitHub's REST API and downloads from another run (`run-id`) don't. A change applies to the next job; jobs on this pool keep finding the artifacts already in the bucket either way. Omitted, artifacts stay on GitHub.

Allowed values: `GITHUB` | `S3`

**instanceTypes** `SandboxInstanceType[]`

Instance types the pool may launch. The pool launches the type that holds the sandboxes it must place on the fewest hosts, with the fewest spare vCPUs and then the least spare memory. List order settles an exact tie. Ravion chooses the hosts of a pool that lists none from the region's c8id, m8id, r8id, i7i, and i7ie types that support nested virtualization and have NVMe instance store, and launches i7i and i7ie only as spot hosts. High performance and Ludicrous pools that list none use only the newest generation of those types (today c8id, m8id, and r8id, not i7i or i7ie).

See: [SandboxInstanceType](#sandboxinstancetype)

**maxHosts** `integer`

Optional limit on running and booting hosts. Omitted, the pool scales with demand up to AWS quota. A step that waits 30 minutes with the pool at this limit and no sandbox starting or finishing fails with `NO_CAPACITY`.

*(format:int32,min:1)*

## Budget

A spending limit for each billing period: AWS and Ravion costs combined, counted the way the Usage tab counts them.

**limitUsd** `number` *required*

The limit in USD. When the environment's spend reaches it and `enforce` is on, new jobs fail with `Ravion:ExecutionEnvironment:BUDGET_EXCEEDED` until the period resets or the limit is raised.

*(format:double,min:1)*

**killRunningJobs** `boolean`

Also stop jobs already running when an enforced budget is reached, and terminate sandbox hosts as they empty. Only interruptible jobs are stopped: steps with `infrastructure.interruptible: true` and GitHub Actions jobs labelled `interruptible=true`. Every other job (interruptible is off by default, and EC2 steps can't set it) always finishes. Off, running jobs finish and hosts are terminated as they fall idle.

**enforce** `boolean`

Limit spending: when the budget is reached, new jobs fail and the sandbox pool shrinks. Off, spend is still tracked against the limit and reported in `budgetStatus`, but nothing is blocked. Defaults to on.

## SubnetSelection

The VPC subnets the environment's EC2 runners and sandbox hosts launch into. A step's `execution_environment_overrides.subnet` still wins over it.

**mode** `enum` *required*

`PUBLIC` launches into the VPC's subnets whose default route reaches an internet gateway, and `PRIVATE` into those whose default route reaches a NAT gateway, following the VPC as its subnets change. `CUSTOM` launches into exactly the subnets in `subnetIds`. Only one subnet per availability zone is used, the lowest subnet ID in a zone winning.

Allowed values: `PUBLIC` | `PRIVATE` | `CUSTOM`

**subnetIds** `string[]`

The subnets a `CUSTOM` selection launches into. Required for `CUSTOM` and refused for the other modes. A subnet with no route to an internet or NAT gateway is refused.

## SandboxInstanceType

One EC2 instance type the sandbox pool may launch, and the root volume its hosts get.

**type** `string` *required*

EC2 instance type, e.g. `c8i.4xlarge`. It must support nested virtualization.

*(minLen:1)*

**diskGiB** `integer` *required*

Size of each host's root volume in GiB. After 10 GiB for the system and a free-space floor, a third of it caches snapshot chunks and the rest holds the running sandboxes' overlays, so it bounds how many sandboxes the host takes: the 60 GiB default holds four sandboxes of the default 8 GiB reservation. On a type with instance store (such as `c8id` or `m8id`) the sandboxes run on the instance store instead, and on an `EPHEMERAL` pool so does the cache, which leaves the root volume only the system: 30 GiB is enough there.

*(format:int32,min:30,max:16384)*

**diskIops** `integer` *required*

Provisioned IOPS for that volume. 3000 is gp3 baseline and included in the volume price; more is billed, including while the host is parked.

*(format:int32,min:3000,max:80000)*

**diskThroughputMBps** `integer` *required*

Provisioned throughput for that volume in MB/s. 125 is gp3 baseline and included in the volume price; more is billed, including while the host is parked.

*(format:int32,min:125,max:2000)*

## SandboxPerformanceProfile

Allowed values:

* `LUDICROUS`
* `HIGH_PERFORMANCE`
* `BALANCED`
* `LOW_COST`

## SandboxReservePolicy

How many hosts the pool keeps parked and ready for the next step.

**type** `enum` *required*

`PEAK` keeps as many hosts as the busiest minute of the window used. `ROLLING_AVERAGE` keeps the mean of the window's daily peaks. `FIXED` keeps exactly `value` hosts. `NONE` keeps none, so every host goes when it falls idle.

Allowed values: `PEAK` | `ROLLING_AVERAGE` | `FIXED` | `NONE`

**windowDays** `integer` *required*

How many days of usage `PEAK` and `ROLLING_AVERAGE` look back over. Ignored by the other types.

*(format:int32,min:1,max:90)*

**value** `integer` *required*

How many hosts `FIXED` keeps. Ignored by the other types.

*(format:int32,min:0)*

**workingHours** `boolean`

Keep the reserve only during the pool's working hours. Ravion detects them from when the pool's steps ran over the last week, as separate weekday and weekend hours in UTC; a day of usage is enough to start, and they are recalibrated weekly. Outside them the pool keeps no idle hosts; as they begin it launches the reserve's hosts again. Not allowed with `NONE`. Off when omitted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.