I need to transfer files from my bucket to another bucket once a day. The destination bucket is outside of my project.
So I've tried to create a Storage Transfer Service job but obiovsly I get the following authorization error:
Failed to obtain the location of the GCS bucket "destination-bucket-name" Additional details: project-xxxxxxxxxxxxx@storage-transfer-service.iam.gserviceaccount.com does not have storage.buckets.get access to the Google Cloud Storage bucket. Permission 'storage.buckets.get' denied on resource (or it may not exist).
I have the service account key json to access the external bucket, but how can I use it with Storage Transfer Service?
As @AlessioInnocenzi mentioned in the comment section:
To bypass this permission issue, for now I have implemented by my own a cloud function that gets the object, then it upload that object to the other bucket and delete the object from the source bucket.