How to Create a Service Account in Spanner

  1. Go to Google Cloud console.
  2. Click APIs & Services and then Credentials. You might have to click Menu on the top left first.
  3. Click Create Credentials and then Service account.
  4. For Service account name, enter a name for the service account.
  5. Click Create and Continue.
  6. For Select a role, select Cloud Spanner Database Admin for the service account.
  7. Click Done.
  8. Click the created service account.
  9. At the top, click Keys and then Add Key and then Create new key. Make sure the key type is set to JSON and click Create.
  10. You'll get a message that the service account's private key JSON file was downloaded to your computer. Make a note of the file name and where your browser saves it. You'll need it later.
Edit this page on GitHub