Create a Vertex AI Workbench instance

This page shows you how to create a Vertex AI Workbench instance by usingthe Google Cloud console or the Google Cloud CLI. While creating your instance,you can configure your instance's hardware, encryption type, network,and other details.

Before you begin

Before you create a Vertex AI Workbench instance, you must completethe following steps:

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.create permission.Learn how to grant roles.
    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Notebooks API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enable permission.Learn how to grant roles.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.create permission.Learn how to grant roles.
    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the Notebooks API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enable permission.Learn how to grant roles.

    Enable the API

Note: TheNotebooks API lets you manage Vertex AI Workbench resources. For managing Vertex AI resources, see theVertex AI API.

Required roles

To get the permissions that you need to create and manage a Vertex AI Workbench instance, ask your administrator to grant you theNotebooks Admin (roles/notebooks.admin) IAM role on the project. For more information about granting roles, seeManage access to projects, folders, and organizations.

You might also be able to get the required permissions throughcustom roles or otherpredefined roles.

Create an instance

You can create a Vertex AI Workbench instanceby using the Google Cloud console, the gcloud CLI,or Terraform:

Console

  1. In the Google Cloud console, go to theInstances page.

    Go to Instances

  2. Click Create new.

  3. In theNew instance dialog, clickAdvanced options.

  4. In theCreate instance dialog,in theDetails section,provide the following information for your new instance:

    • Name: Provide a name for your new instance. The namemust start with a letter followed by up to 62 lowercase letters,numbers, or hyphens (-), and cannot end with a hyphen.
    • Region andZone: Select a region and zone forthe new instance. For best network performance,select the region that is geographically closest to you.See the availableVertex AI Workbenchlocations.
    • Labels: Optional. Provide custom key-value labels for theinstance.
    • Network tags: Optional. Providenetwork tagsfor the instance.
  5. In theEnvironment section, provide the following:

    • JupyterLab version: Select a JupyterLab version.
    • Version: Use the latest version or a previous versionof Vertex AI Workbench instances.
    • Post-startup script: Optional. ClickBrowse toselect a script to run one time, after the instance is created.The path must be a URL or Cloud Storage path,for example:gs://PATH_TO_FILE/FILE_NAME.
    • Metadata: Optional. Provide custom metadata keys for theinstance.
  6. In theMachine type section, provide the following:

  7. In theDisks section, provide the following:

    • Disks: Optional. To change the default data disk settings,select aData disk type andData disk size in GB.For more information about disk types, seeStorage options.

    • Delete to trash: Optional. Select this checkbox to usethe operating system's default trash behavior, If you usethe default trash behavior, files deleted by using the JupyterLabuser interface are recoverable but these deleted filesdo use disk space.

    • Encryption: SelectGoogle-managed encryption key orCustomer-managed encryption key (CMEK).To use CMEK, seeCustomer-managed encryption keys.

  8. In theNetworking section, provide the following:

  9. In theIAM and security section, provide the following:

  10. In theSystem health section, provide the following:

    • Environment upgrade and system health:To automatically upgrade to newly released environment versions,selectEnvironment auto-upgrade and complete theUpgrade schedule.

    • InReporting, select or clear the following checkboxes:

      • Report system health
      • Report custom metrics to Cloud Monitoring
      • Install Cloud Monitoring
      • Report DNS status for required Google domains
  11. ClickCreate.

    Vertex AI Workbench creates an instance and automatically starts it.When the instance is ready to use, Vertex AI Workbenchactivates anOpen JupyterLab link.

gcloud

Before using any of the command data below, make the following replacements:

  • INSTANCE_NAME: the name of your Vertex AI Workbench instance; must start with a letter followed by up to 62 lowercase letters, numbers, or hyphens (-), and cannot end with a hyphen
  • PROJECT_ID: your project ID
  • LOCATION: the zone where you want your instance to be located
  • VM_IMAGE_PROJECT: the ID of the Google Cloud project that VM image belongs to; the default Google Cloud project ID for supported images iscloud-notebooks-managed
  • VM_IMAGE_NAME: the image name; to find the image name of a specific version, seeFind the specific version
  • MACHINE_TYPE: themachine type of your instance's VM
  • METADATA: custom metadata to apply to this instance; for example, to specify a post-startup-script, you can use thepost-startup-script metadata tag, in the format:--metadata=post-startup-script=gs://BUCKET_NAME/hello.sh

    To enable the JupyterLab 4 preview, use--metadata=enable-jupyterlab4-preview=true. For more information, seeJupyterLab 4 preview.

Execute the following command:

Linux, macOS, or Cloud Shell

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudworkbenchinstancescreateINSTANCE_NAME\--project=PROJECT_ID\--location=LOCATION\--vm-image-project=VM_IMAGE_PROJECT\--vm-image-name=VM_IMAGE_NAME\--machine-type=MACHINE_TYPE\--metadata=METADATA

Windows (PowerShell)

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudworkbenchinstancescreateINSTANCE_NAME`--project=PROJECT_ID`--location=LOCATION`--vm-image-project=VM_IMAGE_PROJECT`--vm-image-name=VM_IMAGE_NAME`--machine-type=MACHINE_TYPE`--metadata=METADATA

Windows (cmd.exe)

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudworkbenchinstancescreateINSTANCE_NAME^--project=PROJECT_ID^--location=LOCATION^--vm-image-project=VM_IMAGE_PROJECT^--vm-image-name=VM_IMAGE_NAME^--machine-type=MACHINE_TYPE^--metadata=METADATA

For more information about the command for creating aninstance from the command line, see thegcloud CLIdocumentation.

Vertex AI Workbench creates an instance and automatically starts it.When the instance is ready to use, Vertex AI Workbenchactivates anOpen JupyterLab link in the Google Cloud console.

Terraform

The following sample uses thegoogle_workbench_instanceTerraform resource to createa Vertex AI Workbench instancenamedworkbench-instance-example.

To learn how to apply or remove a Terraform configuration, seeBasic Terraform commands.

resource "google_workbench_instance" "default" {  name     = "workbench-instance-example"  location = "us-central1-a"  gce_setup {    machine_type = "n1-standard-1"    accelerator_configs {      type       = "NVIDIA_TESLA_T4"      core_count = 1    }    vm_image {      project = "cloud-notebooks-managed"      family  = "workbench-instances"    }  }}

Change the version of JupyterLab on an existing instance

This section describes how to change the JupyterLab version on your instance byusing the Google Cloud console or the gcloud CLI.

Console

To change the JupyterLab version on an existing instance,do the following:

  1. In the Google Cloud console, go to theInstances page.

    Go to Instances

  2. Shut down your instance.

  3. Click the name of your instance to open theInstance details page.

  4. On theSystem tab, do one of the following:

    • To enable JupyterLab 3, clear theEnable JupyterLab 4 checkbox.

    • To enable JupyterLab 4, leave theEnable JupyterLab 4 checkbox selected.

  5. ClickSubmit.

  6. To restart your instance, select the instance and click Start.

gcloud

You can change the JupyterLab version on an existing instance by usingthe following command:

gcloudworkbenchinstancesupdateINSTANCE_NAME\--project="PROJECT_ID"\--location="LOCATION"\--metadata=enable-jupyterlab4=ENABLEMENT_BOOLEAN

Replace the following:

  • PROJECT_ID: your project ID
  • LOCATION: the zone where you want your instance to be located
  • INSTANCE_NAME: the name of your Vertex AI Workbench instance
  • ENABLEMENT_BOOLEAN: use one of the following:

    • false: changes to JupyterLab 3.
    • true: changes to JupyterLab 4. JupyterLab 4 is enabled, by default.

Limitation of JupyterLab 4

When scheduling a notebook run in JupyterLab 4, Vertex AI Workbench storesa copy of the notebook in its current state in Cloud Storage, and then runsthis copy of the notebook according to the schedule. If you edit the originalnotebook, you must create a new schedule to run the updated version of thenotebook.

Network configuration options

A Vertex AI Workbench instance must access service endpointsthat are outside your VPC network.

You can provide this access in one of the following ways:

If you use theprivate.googleapis.com orrestricted.googleapis.com VIP toprovide access to the service endpoints,add DNS entries for each of the required serviceendpoints:

  • notebooks.googleapis.com
  • *.notebooks.cloud.google.com
  • *.notebooks.googleusercontent.com
  • *.kernels.googleusercontent.com

For an instance withthird party credentials, add a DNS entry for the following:

  • *.byoid.googleusercontent.com
Note: When using Vertex AI with Private Google Access to access Google Cloud APIs, the instances must be configured to bypass any web proxies or other network traffic inspection or filtering devices (for example next generation firewalls) for any hostnames in the domains listed in thePrivate Google Access documentation.

Network tags

Your new Vertex AI Workbench instance automatically has thedeeplearning-vm andnotebook-instance network tagsassigned.

The  Virtual machines section of the console navigation menu, with VM instances  selected, showing the currently assigned network tags.

These tags let you manage network access to and fromyour Vertex AI Workbench instance by referencing the tags in yourVPC networking firewall rules. For more information aboutnetwork tags, seeAdd network tags.

To view the network tags for a Vertex AI Workbench instance,do the following:

  1. In the Google Cloud console, go to theVM instances page.

    Go to VM instances

  2. Click the name of the instance.

  3. In theNetworking section, findNetwork tags.

Troubleshooting

If you encounter a problem when you create an instance, seeTroubleshootingVertex AI Workbenchfor help with common issues.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.