GCP ACE · Question 46 · Domain 5.2: Managing service accounts
An application running on a Compute Engine VM needs to read files from a Cloud Storage bucket. What is the MOST secure way to grant the VM access to the bucket?
Answer options:
Use the default Compute Engine service account and grant it the Project Editor role.
Generate a JSON key for a service account and store it on the VM's file system.
Create a custom service account, grant it the Storage Object Viewer role on the bucket, and attach the service account to the VM instance.
Make the Cloud Storage bucket public.
50 questions · hints · full answers · grading