Sandbox Regions
Sandboxes run in a region that you choose when you create them. Pick the region closest to the data sources your sandboxes talk to, such as databases or object storage, to reduce latency.
Vercel Sandbox is available in 19 regions:
Region Code | Region Name | Reference Location |
|---|---|---|
| arn1 | eu-north-1 | Stockholm, Sweden |
| bom1 | ap-south-1 | Mumbai, India |
| cdg1 | eu-west-3 | Paris, France |
| cle1 | us-east-2 | Cleveland, USA |
| cpt1 | af-south-1 | Cape Town, South Africa |
| dub1 | eu-west-1 | Dublin, Ireland |
| fra1 | eu-central-1 | Frankfurt, Germany |
| gru1 | sa-east-1 | São Paulo, Brazil |
| hkg1 | ap-east-1 | Hong Kong |
| hnd1 | ap-northeast-1 | Tokyo, Japan |
| iad1 | us-east-1 | Washington, D.C., USA |
| icn1 | ap-northeast-2 | Seoul, South Korea |
| kix1 | ap-northeast-3 | Osaka, Japan |
| lhr1 | eu-west-2 | London, United Kingdom |
| pdx1 | us-west-2 | Portland, USA |
| sfo1 | us-west-1 | San Francisco, USA |
| sin1 | ap-southeast-1 | Singapore |
| syd1 | ap-southeast-2 | Sydney, Australia |
| yul1 | ca-central-1 | Montréal, Canada |
The default region is iad1.
When you create a sandbox, Vercel resolves the region in this order:
- The
regionyou pass when creating the sandbox. - Your project's default sandbox region, configured in the project settings.
iad1when no region was specified.
Pass the region when you create the sandbox:
sandbox create --name my-sandbox --region sfo1
The CLI --region option is also available on sandbox run and sandbox fork.
Read the region of an existing sandbox with the sandbox.region accessor in the SDK, or from the REGION column of sandbox list in the CLI.
To change the region for all sandboxes a project creates, without passing region on every call:
- From the Vercel dashboard, select your project and go to Settings, then Sandboxes.
- Under Sandbox Regions, select the main region.
- Select Save.
You can also set the project defaults with Vercel CLI (this is the vercel CLI, not the sandbox CLI):
# Set the default region and failover regions for the project
vercel project update my-project --sandbox-region sfo1 --sandbox-failover-regions cle1,iad1
# Clear them
vercel project update my-project --sandbox-region "" --sandbox-failover-regions ""To view a project's configured sandbox regions, run vercel project inspect my-project and check the Sandbox section.
New sandboxes that don't specify a region use the project default. Existing sandboxes keep the region they were created in.
Failover regions are available on Enterprise and Pro plans
Failover regions let sandbox creation succeed even when the main region is unavailable. When Vercel can't provision capacity in the main region, it tries the failover regions in the order you list them.
A snapshot or drive doesn't need to be available in a failover region for failover to work. Vercel loads it across regions for you, as described in Regions and snapshots and Regions and drives.
Teams on the Hobby plan or a Pro trial can set the main region, but can't configure or use failover regions. Requests that include failover regions fail with a payment_required error. If your team moves to the Hobby plan, Vercel ignores previously configured failover regions when creating sandboxes.
Pass failover regions when creating a sandbox, or set them as a project default in the same Sandbox Regions settings section:
sandbox create --name my-sandbox --region iad1 --failover-regions cle1,sfo1
Failover regions must not include the sandbox's main region. To change the failover regions of an existing sandbox, pass failoverRegions to sandbox.update() in TypeScript or failover_regions to box.update() in Python. Pass [] to remove them. With the CLI, run sandbox config failover-regions <name> <region,...|none>.
A snapshot is stored in the region of the sandbox it was created from. You can only create or resume a sandbox from a snapshot in a region where that snapshot is available. Creating a sandbox from a snapshot in another region fails with a snapshot_region_mismatch error.
This applies to persistent sandboxes too: a persistent sandbox resumes from its latest snapshot, so that snapshot must be available in the sandbox's region.
The same rule applies to forks. A fork runs in the source sandbox's region unless you pass region. If the source has a snapshot, that snapshot must be available in the target region.
Snapshots can't be moved between regions. To run an environment in another region, create a new sandbox in that region, run your setup again, and snapshot it there.
Read the regions where a snapshot is available with the snapshot.regions accessor in the SDK, or from the REGIONS column of sandbox snapshots list in the CLI.
A drive is stored in a single region. Choose the region when you create the drive, with the --region option in the CLI or the region parameter in Drive.getOrCreate(). Drives are created in iad1 when you don't specify a region:
sandbox drives get-or-create workspace-cache --region sfo1
A drive's region can't change after creation, and drives can't be moved between regions. Requesting an existing drive with a different region fails with a conflict error.
A sandbox's main region must match a drive's region. Otherwise, creation will fail with a drive_region_mismatch error. Sandboxes that failover to another region will still load their drives, but latency from reads will be higher.
The project default region is not applied to sandboxes that mount drives. Pass region explicitly to match the drive's region when it's not iad1.
Read the region of an existing drive with the drive.region accessor in the SDK, or from the REGION column of sandbox drives list in the CLI.
Active CPU, Provisioned Memory, Sandbox Data Transfer, and Drive rates vary by region. See Regional pricing for the rates in each region. Sandbox Creations and Snapshot Storage are billed at the same rate in all regions where Sandbox is available.
- Snapshots: Save and restore sandbox state.
- Drives (Beta): Attach persistent storage to sandboxes.
- Pricing and Quotas: Snapshot storage rates and sandbox quotas.
- JS SDK Reference: The
regionandfailoverRegionsparameters. - CLI Reference: The
--regionand--failover-regionsoptions.
Was this helpful?