Granting Project Access

Grant and control access to your Google Cloud Platform project and its resources by assigning roles. You can assign roles to project members and to service accounts.

A service account represents a Google Cloud service identity, such as App Engine, and can be used to access other services. To learn about how service accounts are used in App Engine, see Authorizing Apps.

Choosing the right access control

Assign roles to project members and service accounts to define the degree of access to your GCP project. You can use Identity and Access Management (IAM) roles for more fine-tuned access controls. For details about the various App Engine roles, see Access Control.

In general, the primitive roles of Owner, Editor, and Viewer are simpler to use, but the predefined roles have more fine-grained options for access. If you are just experimenting with App Engine, the simplest approach to access control is to grant the Editor role to all people involved with the project, following the instructions below on Setting permissions. Keep in mind that only an Owner can create App Engine applications in the project and add other people to the project.

When your project is ready for more complex roles:

  1. Identify all the different job functions that need access to the project.

  2. Set up a Google Group for each of these job functions.

  3. Add members as desired to each Google Group.

  4. Follow the instructions below on setting permissions below to add each Google Group as member of the project and set roles on each group.

Setting permissions

To add a project member and set permissions:

  1. In the Google Cloud Platform Console, visit the IAM & Admin Permissions page for your project.

    Go to the IAM & Admin Permissions page

  2. Click Add member to add new members to the project and set their roles using the dropdown menu. You can add an individual user email or if you use Google Groups to manage group roles, you can supply a Google Group email (

    Add members screenshot

  3. Assign a role.

To see descriptions and a comparison matrix of all the App Engine roles, and to read about limitations, go to Access Control.

There are other roles in the dropdown menu that apply to other Google Cloud Platform products. For more information on these roles, see Predefined roles.

Deploying using IAM roles

You can grant the ability to deploy new versions of apps to your GCP project by assigning the appropriate IAM roles to a user account.

The App Engine Deployer role is the recommended role for a user account that is responsible for only deploying apps. The App Engine Admin role can also deploy apps but allows additional privileges. Depending on which configuration files must be deployed, you might also need to grant additional roles to an account as explained in the steps below.

Configuring traffic

By default, a user account with the App Engine Deployer role is not allowed to migrate or split traffic to any version of an app. However, if a deployment targets an existing version that is currently serving traffic, the updated version of that app will retain the original traffic settings of the overwritten version.

For example, if version 20201155example is currently serving traffic in your app, when you run the gcloud app deploy --version 20201155example command, the updated version will overwrite the existing version and then begin serving traffic.

If a user account should be responsible for configuring traffic, consider using either the App Engine Admin or App Engine Service Admin role.

Before you begin

Before any user account can deploy apps using an IAM role:

To grant a user account the ability to deploy to App Engine:

  1. In the Google Cloud Platform Console, visit the IAM & Admin permissions page for your project:

    Go to the Permissions page

  2. Click Add member to add the user account to the project and then select all of the roles for that account by using the dropdown menu:

    • Required roles to allow an account to deploy to App Engine:
      1. Set the one of the following roles:
        • Use the App Engine > App Engine Deployer role to allow the account to deploy a version of an app.
        • To also allow the dos.yaml or dispatch.yaml files to be deployed with an app, use the App Engine > App Engine Admin role instead.
        The user account now has adequate permission to use the Admin API to deploy apps.
      2. To allow use of App Engine tooling or plugins to deploy apps, you must also give the user account all of the following roles:
        • Storage > Storage Admin role: Tooling permissions for uploading to Cloud Storage.
        • Cloud Build > Cloud Build Editor role: Tooling permission for using the Cloud Build service.
          If you don’t see this role, you must first enable the Cloud Build API:
          Go to API Library page
    • Optional. Give the user account the following roles to grant permission for uploading additional configuration changes:
      • Datastore > Datastore Index Admin role: Permissions for uploading index.yaml files.
      • Cloud Scheduler > Cloud Scheduler Admin role: Permissions for uploading cron.yaml files.
      • To allow a user account to deploy changes to the default networking configuration, you must give the account a role with adequate permissions, such as the Compute Engine > Compute Network Admin role.

The user account can now deploy apps to the App Engine application in the associated GCP project. For details about how to deploy apps, see Deploying your app.

If you configured permissions as instructed above but accounts remain unable to deploy apps, use the following steps to ensure that your GCP project is configured properly.

By default, when you create a new GCP project and enable it for the App Engine flexible environment, that project gets created with all of the permissions and APIs that are required for deploying apps. However, it is possible for one or more of those permissions or APIs to be removed through the project settings. These instructions show you what to check for if you experience a deployment failure.

Verify that the following exist or have been enabled in your GCP project:

  1. The App Engine application has been created and billing is enabled.

  2. The following APIs are enabled in the GCP Console:

    1. Google App Engine Flexible Environment

      Go to APIs Library page

    2. Google Cloud Build API:

      Go to APIs Library page

  3. In the IAM & admin page of the GCP Console, ensure that the Google APIs service account that is used by Google Cloud Build, [PROJECT_NUMBER]>, has the Editor permissions. The service account must have permissions to write to the staging.[PROJECT_ID] bucket to stage files for Cloud Cloud Build. By default, this service account has the Editor role on the project so you should only need to make changes here if you changed this service account’s role:

    Go to Service Accounts page

Was this page helpful? Let us know how we did:

Send feedback about...

App Engine flexible environment for Java docs