Which service account is used when running Firebase Cloud Functions?

只愿长相守 提交于 2021-01-26 10:29:31

问题


I'm trying to create a schedule Cloud Function exporting my Firestore database to create backups. The code is running fine when serving on my local machine (which uses my personal user account with owner role) but failes once deployed. I already found out that I need to add the 'Storage Admin' and 'Datastore Import Export Admin' to the service account used when running the cloud function, but I can't figure out which service account is used for the functions.

Does anyone know which service account is used?


回答1:


Firebase Cloud Functions use the {project-id}@appspot.gserviceaccount.com service account (App Engine default service account). Roles and permissions added to this service account carry over to the Cloud Functions runtime.

Good to know: When using Google Cloud Functions, the service account being used while running the function can be defined when deploying the function.



来源:https://stackoverflow.com/questions/56618350/which-service-account-is-used-when-running-firebase-cloud-functions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!