Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

GCS GCE lab – I’ve got Access Denied while copying the file even though the instance is running the compute service account

The script provided at class GCS & GCE Challenge Lab isn’t working fine for me and I couldn’t realize what is wrong.

I’ve got AccessDeniedException even thoght the instance has the [project-id]compute@developer.gserviceaccount.com service account and it is a Project Editor.


Copying the log file to the bucket...

+ gsutil cp machine-my-vm-4-finished.txt gs://sylvio-vm-logs/

Copying file://machine-my-vm-4-finished.txt [Content-Type=text/plain]...

AccessDeniedException: 403 Insufficient Permission 

2 Answers

It worked after I changing Access Scopes to full access. Cheers

Good for you, Sylvio!  This has been a very effective learning experience for you, I think: you’ll always remember (because you understand how it works) that the scopes and the permissions must both allow the action. 🙂  Keep being awesome!

fsmontenegro

Hi there, I got it working after adding the GCE service account as editor on the bucket in addition to R/W on scopes for the instance. Wondering if it’s a recent change…

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?