GCP ACE · Question 45 · Domain 5.2: Managing service accounts
You have an application running on a Compute Engine VM that needs to read files from a specific Cloud Storage bucket.
What is the most secure way to grant the application access to the bucket?
Answer options:
Generate a service account JSON key, place it on the VM, and configure the application to use it.
Create a custom service account, grant it the 'Storage Object Viewer' role on the bucket, and attach the service account to the VM.
Make the Cloud Storage bucket public so the application can read it.
Use your personal user account credentials and run 'gcloud auth login' on the VM.
50 questions · hints · full answers · grading