Creating a service account in Google Cloud Platform (GCP)
Creating a service account in Google Cloud Platform (GCP) involves a few steps. Here's a clear guide:
Go to GCP Console
Select your project or create a new one.
In the left-hand menu, go to "IAM & Admin" → "Service Accounts".
Click the "Create Service Account" button.
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.
Click Create and Continue.
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)
Click Continue.
In the Service Accounts list, find your new account.
Click the three dots (︙) under "Actions" → Manage keys.
Click Add Key → Create new key.
Select JSON as the key type.
Click Create — the JSON file will download automatically.
Store this JSON file securely. This file contains credentials required for authentication.
Use the JSON key file when interacting with GCP services via SDKs, CLI tools, or deployment configurations.
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
Click the "Create Service Account" button.
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.
Click Create and Continue.
Step 4: Assign Roles
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)
Click Continue.
Step 5: Generate a Key
In the Service Accounts list, find your new account.
Click the three dots (︙) under "Actions" → Manage keys.
Click Add Key → Create new key.
Select JSON as the key type.
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.
Updated on: 02/04/2025
Thank you!