Learn about the known limitations of the Google Cloud Storage (GCS) connector and how to troubleshoot common issues.
Validate Google Cloud Connector Bucket Credentials
A successful creation of Google Cloud Storage (GCS) connector indicates that the credentials supplied are valid. If there's an issue we suggest you to validate the credentials using a Python script.
Install the Boto3 Python library on your machine or in your Python virtual environment.
-
In this script, enter your HMAC keys (see Prepare Your Google Cloud Storage Connection) and your GCS connector bucket name for SRV_ACC_ACCESS_KEY, SRV_ACC_SECRET_KEY, and SRV_BUCKET_NAME.
import boto3 import pprint s3 = boto3.resource('s3') pp = pprint.PrettyPrinter(indent=2) SRV_ACC_ACCESS_KEY = "<Add Key Access ID here>" SRV_ACC_SECRET_KEY = "<Add Key Secret here>" SRV_BUCKET_NAME = "<Add bucket name here>" def get_gcs_objects(google_access_key_id, google_access_key_secret, gc_bucket_name): """Gets GCS objects using boto3 SDK""" client = boto3.client("s3", region_name="auto", endpoint_url="https://storage.googleapis.com", aws_access_key_id=google_access_key_id, aws_secret_access_key=google_access_key_secret) # Call GCS to list objects in gc_bucket_name response = client.list_objects(Bucket=gc_bucket_name) pp.pprint(response) get_gcs_objects(SRV_ACC_ACCESS_KEY, SRV_ACC_SECRET_KEY, SRV_BUCKET_NAME) -
Run the Python script.
Your credentials are valid if the script lists the objects in your GCS bucket and indicates that your HMAC keys are valid.