A colleague of mine has created a google cloud platform project for which we would like to use the Cloud Storage product. They have made me co-owner and storage admin in the IAM permissions. According to the google docs a storage admin has
storage.objects.* permissions so I should be able to
get bucket objects.
I wrote a simple python script to download some content as follows (pseudocode only):
storage_client = storage.Client() bucket = storage_client.bucket(BUCKET_NAME) blob = bucket.blob(source_blob_name) blob.download_to_filename(destination_file_name)
However, the last line throws an error:
google.api_core.exceptions.Forbidden: 403 GET does not have storage.objects.get access to the Google Cloud Storage object.
I've checked my permissions again and again in the cloud console, and also made sure that my
GOOGLE_APPLICATION_CREDENTIALS environment variable is defined. Why is GCP refusing me access to this bucket and how can I fix this?