Cloud Functions deploy: Could not upload source — storage bucket permission denied
The deploy can't stage the source ZIP in the gcf-sources bucket.
Could not upload source to bucketAccessDeniedException: 403 does not have storage.objects.create accessgcf-sources bucket permission deniedCloud Functions deployment storage.buckets.get deniedBuild failed: could not stage source Meaning
The Cloud Functions/Cloud Build service accounts need Storage permissions on the staging bucket (gcf-sources-*/gcf-artifacts), and the deploying user needs roles/storage.objectAdmin-level access. Check org policies, VPC-SC and that the bucket wasn't deleted.
Common causes
- Deployer lacks storage permissions
- Staging bucket deleted or recreated
- Service agent missing bucket access
- VPC-SC perimeter
- Uniform access with missing IAM
⚡ Quick fix
- Grant storage roles to the deployer and service agents
- Recreate the staging bucket via a redeploy
- Check VPC Service Controls logs
Detailed fix by platform
Shell
- bash
gcloud storage buckets list --filter="name~gcf-sources" gcloud storage buckets add-iam-policy-binding gs://BUCKET --member=user:you@example.com --role=roles/storage.objectAdmin
How to diagnose
- Bucket — Exists?
- IAM — Storage role?
- Perimeter — Blocking?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 403: does not have storage.objects.get access Cloud Storage: 403 Forbidden — user@example.com does not have storage.objects.get access to the Google Cloud Storage object
- App Engine App Engine deploy failed: invalid app.yaml (runtime not supported / entrypoint / handlers)
- Cannot find module Cloud Functions: Error: Cannot find module 'X' (dependency missing at runtime)
Most viewed in Google Cloud / Firebase
- Missing or insufficient permissions Firestore: FirebaseError: [code=permission-denied]: Missing or insufficient permissions
- Container failed to start Cloud Run: The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable
- 409: The resource already exists Compute Engine: ERROR: (gcloud.compute.instances.create) Could not fetch resource: The resource 'projects/p/zones/z/instances/vm-1' already exists
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026