Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
An automated batch processing application runs on a Google Compute Engine virtual machine (VM). The application needs to read log files from a specific Cloud Storage bucket without human intervention. You want to follow Google Cloud recommended practices by adhering to the principle of least privilege and minimizing security risks.
Which configuration should you implement to provide the application with the appropriate identity and access?
The Compute Engine default service account is a user-managed service account automatically created when the Compute Engine API is enabled in a project. It is identified by the format PROJECT_NUMBER-compute@developer.gserviceaccount.com and is automatically attached to new VMs created via the console or CLI unless specified otherwise.
roles/editor) role across the entire project. This gives the VM permission to deploy, modify, and delete resources across almost all Google Cloud services, far exceeding the read-only bucket access required.This option might be acceptable for rapid, short-lived proof-of-concept testing in an isolated sandbox project where security posture and least privilege are not concerns.
To improve security, organizations should enforce the constraints/iam.automaticIamGrantsForDefaultServiceAccounts policy constraint, which prevents newly created default service accounts from being granted the Editor role automatically.
A user-managed service account is an IAM identity created specifically for applications and automated workloads to authenticate and interact with Google Cloud APIs securely without requiring human user credentials or long-lived secret keys. In Compute Engine, attaching a service account to a virtual machine (VM) provides short-lived tokens via the instance metadata service using Application Default Credentials (ADC). When the VM is configured with the https://www.googleapis.com/auth/cloud-platform access scope, the instance permits access across all Google Cloud API methods, delegating full authorization control to Cloud Identity and Access Management (IAM) roles.
roles/storage.objectViewer role specifically on the target Cloud Storage bucket limits the application to reading objects only within that single bucket, preventing unnecessary project-wide access or modification rights.cloud-platform ensures the VM does not artificially bottleneck or restrict the service account's API calls. Effective access is the intersection of the access scope and IAM permissions; configuring cloud-platform allows the IAM role to determine access directly.
cloud-platform scope allows administrators to adjust IAM permissions centrally without restarting or reconfiguring the VM.This approach strictly aligns with the principle of least privilege and Google Cloud security best practices. By combining a dedicated user-managed service account, resource-level role assignment, and the recommended cloud-platform scope, security administrators retain full, centralized control over permissions exclusively through IAM.
User accounts in Google Cloud represent human individuals—such as developers, operators, or administrators—and are managed in Cloud Identity or Google Workspace. They are designed for interactive authentication, browser-based sign-in, and multi-factor authentication (MFA).
Using user credentials would be appropriate if an individual developer were interacting directly with Google Cloud services during local development on their personal workstation using gcloud auth application-default login.
Workloads running on Google Cloud infrastructure should always use attached service accounts rather than user credentials. This eliminates credential management overhead and ensures workload authorization is isolated from human access policies.
Access scopes are a legacy mechanism used by Compute Engine instances to specify default OAuth 2.0 scopes for requests made by the attached service account. They act as a coarse-grained perimeter filter on the instance level, defining the maximum permissions that applications running on that specific VM can exercise.
https://www.googleapis.com/auth/compute.readonly scope only authorizes read-only access to Compute Engine API methods. Because this scope excludes Cloud Storage APIs entirely, any attempt by the application to read objects from the bucket will be denied with an authorization error, despite the service account having the roles/storage.objectViewer IAM role.cloud-platform access scope and enforce precise access control exclusively using IAM roles.This configuration would be appropriate if the VM only needed to inspect Compute Engine instances and metadata without interacting with Cloud Storage or other Google Cloud services.
When debugging permission issues on Compute Engine, administrators must check both IAM policies and instance access scopes. An IAM role alone is insufficient if the access scope restricts the target API.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated