Creating a service account in Google Cloud Platform (GCP)

Last updated: April 22, 2025

Creating a service account in Google Cloud Platform (GCP) involves a few steps. Here's a clear guide:

Step 1: Sign in to Google Cloud Console

  • Go to GCP Console

  • Select your project or create a new one.

Step 2: Navigate to the IAM & Admin Section

  • In the left-hand menu, go to "IAM & Admin""Service Accounts".

Step 3: Create the Service Account

  1. Click the "Create Service Account" button.

  2. Fill in the following:

  • Name: A meaningful name (e.g., my-service-account).

  • ID: Auto-filled based on the name (can be customized).

  • Description: Optional but useful for clarity.

  1. Click Create and Continue.

Step 4: Assign Roles

  1. Choose the appropriate roles for the service account based on required permissions.For example:

  • Viewer (read-only access)

  • Editor (read/write access)

  • Owner (full control, use with caution)

  1. Click Continue.

Step 5: Generate a Key

  1. In the Service Accounts list, find your new account.

  2. Click the three dots (︙) under "Actions" → Manage keys.

  3. Click Add KeyCreate new key.

  4. Select JSON as the key type.

  5. Click Create — the JSON file will download automatically.

|| Store this JSON file securely. This file contains credentials required for authentication.

Step 6: Use the Service Account

  • Use the JSON key file when interacting with GCP services via SDKs, CLI tools, or deployment configurations.