Why is the Google Cloud function not finding the default Datastore database?

I have set up a Google Cloud function that automatically runs a document AI processor when a document is uploaded to a storage bucket, and then sends the results to Datastore. I have created a database in “Datastore mode” called (default), but when I run my function, I get this error logged:

Error writing to DataStore. Here are error details
Grpc.Core.RpcException: Status(StatusCode="NotFound",
Detail="The database (default) does not exist for project
*projectID* Please visit
https://console.cloud.google.com/datastore/setup?project=*projectID*
to add a Cloud Datastore or Cloud Firestore database. ")

I am not very experienced with Google Cloud (it is my first time using it) so please let me now what information might be needed to solve this.

Read more here: Source link