[我们有一个当前在Cloud ML上使用的模型。作为修改,我们向数据存储区添加了连接,该连接返回403,权限不足。
产生错误的模拟代码是:
from google.cloud import datastore
import datetime
# create & upload task
client = datastore.Client()
key = client.key('Task')
task = datastore.Entity(
key, exclude_from_indexes=['description'])
task.update({
'created': datetime.datetime.utcnow(),
'description': 'description',
'done': False
})
client.put(task)
# now list tasks
query = client.query(kind='Task')
query.order = ['created']
return list(query.fetch())
下一步将是添加凭据(服务帐户)并将新路径导出到GOOGLE_APPLICATION_DEFAULT
参数。但是,由于很难获得该帐户(公司分层),因此我想通过提问来节省时间。
是通过Cloud Functions与NoSQL DB通信的唯一方法吗?这是常用的方法吗?
gcloud components install beta
gcloud beta ai-platform versions create your-version-name \
--service-account your-service-account-name@your-project-id.iam.gserviceaccount.com
...