Cloud Functions IAM Roles
The following table describes Identity and Access Management (IAM) roles that are associated with Cloud Functions, and lists the permissions that are contained in each role.
Roles can be granted to users on an entire project or on individual functions. Read Managing Access via IAM to learn more.
Cloud Functions roles
For developers that want to define their own roles containing bundles of permissions that they specify, IAM offers custom roles.
If the role contains permissions that let a developer deploy functions, then you must perform the additional configuration in the next section.
Additional configuration for deployment
In order to assign a user the Cloud Functions Admin
roles/cloudfunctions.admin) or Cloud Functions Developer role
roles/cloudfunctions.developer) or a custom role that can deploy functions,
you must also assign the user the Service Account User IAM role
roles/iam.serviceAccountUser) on the Cloud Functions
runtime service account.
Go to the Google Cloud console:
Select the Runtime Service Account (
PROJECT_ID@appspot.gserviceaccount.com) from the table.
Click Manage Access.
Click Add member.
Enter the member (for example, user or group email) that you're granting the Admin or Developer role to.
roles/iam.serviceAccountUserrole under Service Accounts > Service Account user in the Select a role dropdown.
gcloud iam service-accounts add-iam-policy-binding \ PROJECT_ID@appspot.gserviceaccount.com \ --member MEMBER \ --role roles/iam.serviceAccountUser