Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to schedule a Vertex AI workbench instance using Instance schedule

Hi, 

I am trying to schedule a Vertex AI workbench instance using Instance Schedule. However, I get an error

"Required 'Current principal doesn't have permission to mutate this resource!' permission for XXXXXX". I have assigned the service account associated to this instance with below roles 

  • Compute Admin 
  • Vertex AI Service Agent
  • Service Account User
  • Service Usage Consumer

And to the user who is trying to schedule the instance with following roles

  • Service Account User
  • Compute Admin 

But I still get the error. I am able to schedule a VM instance which is not a Vertex AI instance. Could you please let me know whether it is possible to schedule a Vertex AI workbench instance.

My requirement is to schedule a Vertex AI workbench instance to start at a scheduled time on a daily basis. Kindly propose other alternative if instance schedule is not an option.

Solved Solved
0 2 1,764
1 ACCEPTED SOLUTION

Hello @Gomathinayagam

Welcome to Google Cloud Community!

This error “Current principal doesn't have permission to mutate this resource.” occurs when attempting to edit on a virtual machine (VM) within a Vertex AI Workbench instance. Consider here the following limitations of Vertex AI Workbench Instances.

To edit or make changes to the virtual machine (VM) that underlies a Vertex AI Workbench instance, you can use the:

To grant your user account the following IAM roles are:

  • Notebooks Viewer (roles/notebooks.viewer) - Read-only access to Notebooks all resources.
  • Notebooks Legacy Viewer (roles/notebooks.legacyViewer) - Read-only access to Notebooks all resources through compute API.
  • Notebooks Admin (roles/notebooks.admin) - Full access to Notebooks all resources.
  • Notebooks Legacy Admin (roles/notebooks.legacyAdmin) - Full access to Notebooks all resources through compute API

Additionally, to effectively automate the startup and shutdown of Vertex AI Workbench instances according to your scheduling requirements. Here are the following workaround:

1. Compute Engine Instance with Startup Script
- Use 
a startup script in Compute Engine to start the Vertex AI Workbench instance at the scheduled time.

2. Cloud Scheduler with Cloud Functions
- Use Cloud Scheduler or another scheduling mechanism (like cron jobs) to trigger your Cloud Function at the desired times (example: daily, every week).

For your reference here are the troubleshooting steps that you might find helpful if you run into problems when you use Vertex AI Workbench.

I hope the above information is helpful.

View solution in original post

2 REPLIES 2

Hello @Gomathinayagam

Welcome to Google Cloud Community!

This error “Current principal doesn't have permission to mutate this resource.” occurs when attempting to edit on a virtual machine (VM) within a Vertex AI Workbench instance. Consider here the following limitations of Vertex AI Workbench Instances.

To edit or make changes to the virtual machine (VM) that underlies a Vertex AI Workbench instance, you can use the:

To grant your user account the following IAM roles are:

  • Notebooks Viewer (roles/notebooks.viewer) - Read-only access to Notebooks all resources.
  • Notebooks Legacy Viewer (roles/notebooks.legacyViewer) - Read-only access to Notebooks all resources through compute API.
  • Notebooks Admin (roles/notebooks.admin) - Full access to Notebooks all resources.
  • Notebooks Legacy Admin (roles/notebooks.legacyAdmin) - Full access to Notebooks all resources through compute API

Additionally, to effectively automate the startup and shutdown of Vertex AI Workbench instances according to your scheduling requirements. Here are the following workaround:

1. Compute Engine Instance with Startup Script
- Use 
a startup script in Compute Engine to start the Vertex AI Workbench instance at the scheduled time.

2. Cloud Scheduler with Cloud Functions
- Use Cloud Scheduler or another scheduling mechanism (like cron jobs) to trigger your Cloud Function at the desired times (example: daily, every week).

For your reference here are the troubleshooting steps that you might find helpful if you run into problems when you use Vertex AI Workbench.

I hope the above information is helpful.

Hi @reinc,

Thanks for your response.

I was able to use the method projects.locations.instances.start. I created a cloud scheduler to trigger at a scheduled time. I used the target type as HTTP and called the API "https://notebooks.googleapis.com/v2/{name}:start"