How to Create a GCP Service Account for use with Vertex AI
Last updated
Last updated
This how to article gives you step-by-step instructions for creating a Google Vertex service account with credentials in Google Cloud Platform. It will also show you how to configure an integration from Vectorize to Google Vertex AI as part of a RAG pipeline.
Before starting, ensure you have access to the credentials, connection parameters, and API keys as appropriate for the following:
A Vectorize account (Create one free here ↗)
A GCP Cloud Account (Create one free here ↗)
Open Google Cloud Console
Navigate to the Google Cloud Console.
Make sure you are working in the correct project.
Go to APIs & Services
From the dashboard, locate the "APIs & Services" option in the quick access section.
Click on APIs & Services.
Enable Cloud Storage API
Click on ENABLE APIS AND SERVICES.
In the API library, use the search box and type Vertex AI to locate the API.
From the search results, click on the Vertex AI Option option from Google Enterprise API.
On the Vertex AI API details page, click ENABLE.
If the API is already enabled, you can go to the next step.
Navigate to APIs & Services > Credentials.
Click CREATE CREDENTIALS, then click Service account.
Fill in your service details
Provide a Service account name, this will automatically populate the Service account ID field as well
Click on CREATE AND CONTINUE, making sure you're clicking the button shown and NOT the more prominent DONE button.
Assign roles to your service account
In the role selection section, grant the Viewer role for the service account.
Finalizing the Service Account
To finalize the setup, click DONE to complete the creation of the service account.
Select the Service Account
After creating the service account, you should see a list with the new service account listed.
If you left that page, you can always get to it by going to IAM & Admin > Service Accounts using upper left "hamburger" menu.
Click on the service account email to manage it.
Go to the Keys Tab
Once in the service account details, navigate to the KEYS tab.
Add a New Key
Open the ADD KEY dropdown
Select Create new key to generate a new key for this service account.
Create a JSON Key
When prompted, select the JSON key type and click CREATE.
Save the Key
A JSON file will be downloaded. Save this file securely as it contains the private key for your service account.
Make sure to keep this key file secure, as it cannot be recovered if lost.