0

Node command, as suggested by the tutorial, is not working and throws 403.

node automlNaturalLanguageDataset.js import-data

I had some issues passing parameters, so hard-coded, project id, compute region, etc. I was able to run create-dataset, list-datasets successfully, just not import-data. Error I get:

Error: 3 INVALID_ARGUMENT: Error encountered when accessing gs://<my project id>/csv/happiness.csv, error code 403, error details custom-vision@appspot.gserviceaccount.com does not have storage.objects.get access to <my project id>/csv/happiness.csv.

I invoked gcloud projects add-iam-policy-binding as in the document with my own service account name but it looks like it is pulling the example service account name used in the tutorial. I checked js code as well my environment, could not find this account name. Any idea what I am missing?

Tutorial I am following is at https://cloud.google.com/natural-language/automl/docs/tutorial.

rysv
  • 2,416
  • 7
  • 30
  • 48

1 Answers1

0

Aside from your own service account, you have to allow also AutoML Natural Language service accounts to access your Google Cloud project resources. As instructed in item#9 of the tutorial, you can run the following command:

gcloud projects add-iam-policy-binding project-id --member="serviceAccount:custom-vision@appspot.gserviceaccount.com" --role="roles/storage.admin"

Ronnaver
  • 410
  • 2
  • 5