ACE

Free ACE practice questions

10 questions from our ACE practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.

Back to the ACE practice exams

Question 1 of 10, Setting up a cloud solution environment

Finance wants a daily, queryable record of all Google Cloud charges, including per-resource costs for Compute Engine, so that analysts can build their own reports with SQL. What should you configure?

  1. ACreate a log sink that routes billing audit logs from every project to a BigQuery dataset
  2. BEnable the pricing data export from the Cloud Billing account to a Cloud Storage bucket in CSV format
  3. CCreate a budget on the Cloud Billing account and connect its programmatic notifications to a Pub/Sub topic
  4. DEnable the detailed usage cost export from the Cloud Billing account to a BigQuery dataset Correct answer

Answer and explanation: The detailed usage cost export writes billing data, including resource-level cost rows for supported services such as Compute Engine, into BigQuery, where analysts can query it with SQL. Budget notifications only report spend against a threshold and do not provide line-item data. The pricing export contains list prices and discounts, not actual usage charges, and it targets BigQuery rather than CSV files. Audit logs record administrative actions, not costs.

Question 2 of 10, Setting up a cloud solution environment

A startup has a hard monthly limit of USD 2,000 for a sandbox project. If spending reaches the limit, all billable services in that project must stop automatically, even if this deletes nothing and simply disrupts workloads. What should you implement?

  1. ASend budget notifications to Pub/Sub and have a Cloud Run function disable billing on the project at 100% Correct answer
  2. BA quota override on every API in the project that lowers request limits so that the project cannot spend more than the budget amount
  3. CA budget with an email alert threshold at 100% of the amount, which makes Cloud Billing suspend the project's resources at that threshold
  4. DAn organization policy that restricts the allowed machine types in the project so that compute costs remain below the monthly budget amount

Answer and explanation: Budgets never stop spending on their own; the documented pattern is to publish budget notifications to Pub/Sub and have a function call the Cloud Billing API to detach billing, which stops billable services. An email threshold only notifies people and does not suspend anything. Quota overrides limit request rates, not monetary spend, and cannot reliably cap cost. Restricting machine types reduces some compute cost but does not stop spend at a fixed amount.

Question 3 of 10, Planning and implementing a cloud solution

You are designing a VPC for two regions. The network team wants to choose every subnet range explicitly, avoid overlap with on-premises 10.0.0.0/8 ranges already used in the default auto-mode allocation, and add regions later without surprise subnets. What should you do?

  1. ACreate an auto mode VPC and delete the subnets in regions that you do not use, keeping the two needed regions only
  2. BCreate an auto mode VPC and convert it to custom mode later only if a range conflict is detected with on-premises
  3. CUse the default network and add secondary ranges from 172.16.0.0/12 to the existing subnets in the two regions
  4. DCreate a custom mode VPC and add one subnet per region with ranges you choose, for example from 172.16.0.0/12 Correct answer

Answer and explanation: A custom mode VPC creates no subnets automatically, so the team controls every range and region and can avoid the 10.128.0.0/9 space that auto mode uses. Auto mode VPCs always allocate from 10.128.0.0/9, which overlaps the on-premises 10.0.0.0/8 space, and you cannot delete auto-created subnets while in auto mode. The default network is auto mode with the same overlap. Converting later means the overlap already exists in the meantime.

Question 4 of 10, Planning and implementing a cloud solution

A batch rendering job can be interrupted at any time and resumed from checkpoints, and it must run as cheaply as possible on Compute Engine. Which provisioning option should you choose?

  1. ASole-tenant nodes
  2. BCommitted use discounts for one year
  3. CSustained use discounts on standard VMs
  4. DSpot VMs Correct answer

Answer and explanation: Spot VMs offer the deepest discount for workloads that tolerate preemption, which fits a checkpointed batch job. A one-year commitment requires steady usage for the full term and is not the cheapest choice for interruptible, bursty work. Sole-tenant nodes cost more because they dedicate physical hosts. Sustained use discounts apply automatically to standard VMs but are much smaller than Spot pricing.

Question 5 of 10, Planning and implementing a cloud solution

A stateful application on a single VM must survive a zonal outage with an RPO of zero for its data disk, and failover can take a few minutes. What is the MOST appropriate storage design?

  1. AUse a zonal persistent disk and take snapshots every 10 minutes with a schedule, restoring the latest snapshot in another zone
  2. BUse a regional persistent disk, which replicates synchronously across two zones, and force-attach it to a standby VM on failover Correct answer
  3. CUse a Local SSD in RAID 1 across two VMs in different zones with application-level mirroring configured by a script
  4. DStore the data on Cloud Storage FUSE in a single-region bucket and remount it from a VM in another zone

Answer and explanation: Regional persistent disks synchronously replicate writes to two zones, so a standby VM in the second zone can force-attach the disk with no data loss. Snapshots every 10 minutes allow up to 10 minutes of data loss. Local SSDs cannot be mirrored across VMs as block devices without complex custom tooling. Cloud Storage FUSE does not provide block-level semantics that a stateful database expects.

Question 6 of 10, Ensuring successful operation of a cloud solution

A VM has no external IP address, and the security team forbids opening SSH from the internet. You need to SSH to it from your laptop with gcloud. What should you do?

  1. AConfigure Cloud NAT on the subnet so that inbound SSH sessions are translated to the VM's internal address
  2. BUse the serial console with a VM metadata key instead of SSH and leave serial port access enabled permanently
  3. CCreate a firewall rule that allows TCP 22 from 0.0.0.0/0 and assign an ephemeral external IP temporarily
  4. DAllow ingress TCP 22 from 35.235.240.0/20 and run gcloud compute ssh with the --tunnel-through-iap flag Correct answer

Answer and explanation: Identity-Aware Proxy TCP forwarding tunnels SSH from gcloud through Google, needing only a firewall rule for IAP's range 35.235.240.0/20 and the IAP tunnel role. Opening port 22 to the internet violates the policy. Cloud NAT handles outbound connections only and never accepts inbound sessions. Leaving serial port access permanently enabled is a weaker security posture and is meant for troubleshooting, not routine access.

Question 7 of 10, Ensuring successful operation of a cloud solution

Pods in a GKE Standard cluster fail with ImagePullBackOff when pulling images from an Artifact Registry repository in the same project. The nodes use a custom service account. What is the MOST likely fix?

  1. AEnable the Container Registry API in the project and push the images again with the gcr.io hostname
  2. BGrant the node service account the Storage Object Admin role on the project's Cloud Storage buckets
  3. CGrant the node service account the Artifact Registry Reader role on the repository or project Correct answer
  4. DAdd an imagePullSecrets entry with a service account JSON key to every Deployment manifest

Answer and explanation: Nodes pull images with their service account, which needs roles/artifactregistry.reader on the repository or project. Storage Object Admin applies to Cloud Storage and does not grant Artifact Registry access. Container Registry is retired in favor of Artifact Registry. Using JSON keys in pull secrets works but adds long-lived key risk and is unnecessary when IAM on the node account solves the problem.

Question 8 of 10, Ensuring successful operation of a cloud solution

After enabling Data Access audit logs, an analyst needs to find every read of objects in bucket finance-reports by any user in the last day. Which Logging query is MOST precise?

  1. Aresource.type="gce_instance" AND textPayload:"finance-reports" AND severity>=WARNING
  2. Bresource.type="gcs_bucket" AND logName:"cloudaudit.googleapis.com%2Factivity" AND protoPayload.resourceName:"finance-reports"
  3. ClogName:"cloudaudit.googleapis.com%2Fdata_access" AND resource.labels.bucket_name="finance-reports" AND protoPayload.methodName="storage.buckets.update"
  4. Dresource.type="gcs_bucket" AND resource.labels.bucket_name="finance-reports" AND protoPayload.methodName="storage.objects.get" Correct answer

Answer and explanation: Object reads appear in Data Access audit logs on the gcs_bucket resource with methodName storage.objects.get, and filtering on bucket_name scopes it to the bucket. The activity log holds Admin Activity entries, which do not include object reads. The gce_instance resource type and textPayload apply to VM logs, not Cloud Storage. storage.buckets.update records configuration changes, not object reads.

Question 9 of 10, Configuring access and security. Choose 2.

An engineer must run gcloud commands as the service account deployer@proj.iam.gserviceaccount.com for automation testing, without downloading a key. Which TWO steps are required? (Choose two.)

  1. AGrant the engineer the Service Account Key Admin role so that gcloud can mint a temporary key
  2. BGrant the engineer the Service Account Token Creator role on the deployer service account Correct answer
  3. CAdd the engineer as a member of the deployer service account's Workload Identity pool
  4. DGrant the deployer service account the Owner role so that impersonation inherits full permissions
  5. ERun gcloud commands with --impersonate-service-account=deployer@proj.iam.gserviceaccount.com Correct answer

Answer and explanation: Impersonation requires roles/iam.serviceAccountTokenCreator on the target service account, and gcloud then uses --impersonate-service-account to obtain short-lived tokens. Service Account Key Admin manages keys, which the requirement avoids. Giving the service account Owner breaks least privilege and is unrelated to whether a user may impersonate it. Workload Identity pools federate external workloads and are not how a Google user impersonates a service account.

Question 10 of 10, Configuring access and security

A team needs a role that allows starting and stopping Compute Engine VMs, but not creating or deleting them. No predefined role matches exactly. What should you do?

  1. ACreate a custom role with compute.instances.start, compute.instances.stop, and compute.instances.get permissions and grant it Correct answer
  2. BGrant Compute Instance Admin (v1) and add an IAM deny policy that blocks every other Compute Engine permission in the project
  3. CGrant Compute Viewer at the project and give the team a documented runbook of the gcloud compute instances start and stop commands
  4. DGrant the Editor basic role at the project level and ask the team not to delete instances

Answer and explanation: Custom roles let you bundle exactly the permissions needed, such as start, stop, and get on instances. Combining a broad role with deny policies is fragile and harder to audit than a precise custom role. Editor grants far more than required. Compute Viewer is read-only, so the commands would fail without start and stop permissions.