Configure permissions so a set of Compute Engine instances can write objects to a specific Cloud Storage bucket following best practices. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a service account and grant it the IAM role storage.objectCreator on that bucket..
Why this is the answer
The correct approach is to create a service account and grant it the storage.objectCreator IAM role on the specific Cloud Storage bucket. This adheres to the principle of least privilege, providing only the necessary permissions for writing objects without granting broader access. Using OAuth access scopes (like write-only or full Cloud Platform) is an older, less granular method of controlling access to Google Cloud services from Compute Engine instances. While they can provide access, they are not as precise as IAM roles. The "full Cloud Platform" scope, in particular, grants extensive permissions across many services, violating the principle of least privilege. The storage.objectAdmin role grants permissions to create, update, and delete objects, as well as manage object ACLs. While it includes object creation, it's more permissive than needed for simply writing objects, making storage.objectCreator the more appropriate choice for best practices.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed