Free Google Cloud ACE practice test

20 questions for the Google Cloud Associate Cloud Engineer (ACE) exam, taken from our 251-question bank and spread across its 5domains by their weighting. No sign-up needed: pick an answer to check it, or open “Show answer & explanation” under any question.

What this test covers

Question 1 · Setting up a cloud solution environment

A startup is growing and needs to migrate from a flat project structure to a multi-level resource hierarchy with an organization node, folders, and projects. Which statement best describes the migration considerations and constraints? (Select TWO.)

Select 2 answers.

Show answer & explanation

Correct answers: C, E

  • C. Existing projects can be moved into the organization and organized into folders without downtime
  • E. Once a project is placed in an organization, it cannot be removed to standalone status

Existing projects can be moved into an organization and organized into folders without service downtime (option C is true). Once a project belongs to an organization, it cannot be removed to standalone status (option E is true). Option A is false; billing accounts are separate from the organizational hierarchy and don't need reassignment based on org structure. Option D is false; IAM policies don't automatically migrate—you must reapply them as needed in the new structure. Option B is false; project-level quotas are not reset during organizational moves.

Question 2 · Setting up a cloud solution environment

Your organization has multiple billing accounts for different business units. You want to export billing data from all accounts to BigQuery for unified cost analysis. Which statement is true about enabling billing exports to BigQuery? (Select TWO.)

Select 2 answers.

Show answer & explanation

Correct answers: A, D

  • A. Data exported to BigQuery is encrypted at rest by default and includes all billing and cost analysis details
  • D. Billing export must be configured per billing account

Billing exports are configured per billing account (option D is correct), so you must set up each one individually. The exported data is encrypted at rest by default and includes detailed billing information (option A is correct). Option E is false; a billing account can export to one dataset, but you can have multiple datasets. Option C is partially correct but misleading; the dataset doesn't need to be in the billing account's project—it can be in any project you have access to. Option B is false; each billing account export goes to a single dataset.

Question 3 · Setting up a cloud solution environment

You are setting up a new Google Cloud environment for a startup. The organization has decided to use a single billing account for all projects. Where in the resource hierarchy would you attach the billing account?

Show answer & explanation

Correct answer: A

  • A. Directly to each individual project

A billing account is attached directly to one or more projects, not to the organization or folders. While you can have billing accounts at different organizational levels for tracking purposes, the actual billing relationship is project-to-billing-account. Cloud Shell is a tool for CLI access, not a place to attach billing accounts. Folder-level billing attachment is not how GCP billing works structurally.

Question 4 · Setting up a cloud solution environment

A developer accidentally included a service account key file in a GitHub commit to your public repository. What are the critical next steps? (Select THREE.)

Select 3 answers.

Show answer & explanation

Correct answers: A, D, E

  • A. Immediately revoke or regenerate the compromised service account key
  • D. Update all application configurations to use the new key
  • E. Check Cloud Audit Logs for any unauthorized activity using the compromised key

The critical steps are to immediately revoke/regenerate the compromised key (option A) to stop further abuse, check Audit Logs for unauthorized usage (option C), and update applications to use the new key (option D). Option B is unnecessary if you revoke the key; you can reuse the service account. Option E is important but isn't preventing immediate impact like the key revocation does. Option F is not a GCP best practice; you should focus on internal key management.

Question 5 · Planning and configuring a cloud solution

A small startup is launching an internal scheduling microservice that runs 5-minute background tasks triggered by Cloud Scheduler every hour. The tasks process in-memory data, take approximately 30 seconds to execute, and have variable resource requirements. Which compute solution is most cost-effective?

Show answer & explanation

Correct answer: A

  • A. Cloud Functions with a 512 MB memory allocation and 60-second timeout

Cloud Functions is the best choice because the workload is short-lived (30 seconds), triggered on a schedule, and doesn't require constant availability. You pay only for execution time (0.1-second granularity), making it extremely cost-efficient for sporadic tasks. Cloud Run would work but requires at least one warm instance by default and higher memory overhead. Compute Engine with a continuously running instance wastes money since the task only runs 1 hour per day (60 minutes of compute vs. ~30 seconds of actual work). GKE adds unnecessary orchestration complexity and cost for a simple scheduled task.

Question 6 · Planning and configuring a cloud solution

Your organization runs a batch data processing job that loads 50 TB of CSV files from Cloud Storage and analyzes them once monthly. The job takes 2 hours to complete using a 10-node GKE cluster. Which component would provide the best cost reduction without redesigning the application?

Show answer & explanation

Correct answer: A

  • A. Use preemptible VMs for the GKE nodes to reduce compute costs

Preemptible VMs offer up to 70% cost savings and are ideal for fault-tolerant batch jobs that can tolerate interruptions—this job can simply restart if a node is preempted. This requires minimal application changes. Switching to Coldline won't help since the files are accessed once monthly (within the 30-day threshold where retrieval costs become significant). BigQuery would require redesigning the entire application, not just a component change. Committed use discounts provide savings but less than preemptible VMs and don't offer the same financial upside for variable, short-duration workloads.

Question 7 · Planning and configuring a cloud solution

Your organization is building a real-time analytics dashboard that requires querying 500 GB of historical data plus ingesting 10 GB of new data daily. Queries typically scan 50-100 GB of data and must complete within 5 seconds. You also need to support ad-hoc SQL queries from analysts. Which database is most suitable?

Show answer & explanation

Correct answer: A

  • A. BigQuery with automated table partitioning and clustering

BigQuery (option 2) is correct. It's specifically designed for analytical queries over large datasets (500 GB historical + 10 GB daily ingestion). BigQuery can execute 50-100 GB table scans in seconds with partitioning/clustering optimization. Native SQL support meets the ad-hoc query requirement. Option 0 (Cloud SQL) is inappropriate; it's optimized for OLTP (row-level operations), not OLAP (analytical scans). SQL instances would struggle with 50-100 GB table scans in 5 seconds. Option 1 (Bigtable) is a wide-column store optimized for time-series data and single-row/narrow-range queries, not full-table analytical scans. Option 3 (Spanner) is a distributed relational database for transactional consistency at scale, not optimized for analytical queries at BigQuery's performance level.

Question 8 · Deploying and implementing a cloud solution

You are deploying a simple REST API using Cloud Run that reads configuration from a YAML file at startup. The YAML file is 2 MB and contains sensitive API keys. How should you provide this configuration to the Cloud Run service?

Show answer & explanation

Correct answer: A

  • A. Store the configuration in Secret Manager and read it at container startup using the Secret Manager API

Option 2 is correct. Secret Manager is the appropriate service for storing sensitive data (API keys). Your container reads the secret at startup using the Secret Manager API. This keeps secrets out of container images and provides audit logging. Option 0 is incorrect; while you can package non-sensitive config in images, hardcoding or passing API keys via environment variables is insecure. Option 1 is incorrect; Cloud Run does not support direct filesystem mounts of Cloud Storage buckets; you would need to implement explicit object download logic. Option 3 is insecure for sensitive data and Cloud Run environment variable size limits (4 KB total) would not accommodate a 2 MB YAML file. Option 4 (Cloud SQL) is overkill for configuration management and adds unnecessary database overhead.

Question 9 · Deploying and implementing a cloud solution

Your organization is setting up a VPC network with subnets in multiple regions. You need to restrict outbound traffic from your subnets to specific external services (e.g., only allow HTTPS to a partner API, block all other internet traffic). What is the minimal set of resources you need to configure?

Show answer & explanation

Correct answer: A

  • A. Create a VPC, define subnets, and create firewall rules with direction egress on the subnets

Option 0 is correct. You need a VPC, subnets, and egress firewall rules (direction=EGRESS with specific destination CIDRs/ports). This minimal setup restricts outbound traffic as required. Option 1 adds Cloud NAT, which is unnecessary if instances already have external IPs or you're only restricting outbound destinations via firewall rules (Cloud NAT is for providing outbound NAT to instances without external IPs). Option 2 includes VPC Flow Logs, which is monitoring, not a requirement for traffic restriction. Option 3 includes a load balancer, which is for inbound traffic distribution, not relevant to egress restriction. Note: Firewall rules must be the primary tool here; without them, you cannot restrict outbound traffic.

Question 10 · Deploying and implementing a cloud solution

Your organization stores customer data in a Cloud Storage bucket with a retention policy requiring that objects cannot be deleted for 90 days. A compliance audit requests that you permanently delete an object that was stored 30 days ago. Which statement is true?

Show answer & explanation

Correct answer: D

  • D. You cannot delete the object until the 90-day retention period expires, even if you have full admin permissions

Correct answer: (D) Object retention policies are immutable for the specified duration. No role or command can bypass retention—the object cannot be deleted until the retention period expires. This is a security feature. Wrong answers: (A) gsutil rm will fail because the object is under retention; (B) Retention policies cannot be modified retroactively and the compliance requirement cannot override the policy; (C) Cloud Audit Logs are for auditing, not policy exceptions.

Question 11 · Deploying and implementing a cloud solution

You need to give an external partner temporary read access to a private object in a Cloud Storage bucket without making the bucket or object public and without creating a Google account for the partner. The access should expire in 24 hours. What should you use?

Show answer & explanation

Correct answer: A

  • A. Generate a signed URL for the object with a 24-hour expiration using a service account key

A signed URL provides time-limited, cryptographically signed access to a specific object. The partner can access the object via the URL without a Google account, and the URL automatically expires after the defined period (24 hours here). Updating the bucket's IAM policy requires the partner to have a Google identity and grants persistent access (not time-limited without later revoking it). Making the object publicly readable removes all access controls and exposes it to anyone with the URL — not a controlled, partner-specific solution. VPC Service Controls restrict access to Google APIs based on network and project boundaries; they are designed for internal Google Cloud workloads, require the partner to have a GCP project/identity, and do not create time-limited access.

Question 12 · Deploying and implementing a cloud solution

Your team has a Compute Engine instance running a custom application that logs output to /var/log/app.log. The instance is part of a managed instance group (MIG) with autoscaling enabled. After the instance is terminated during scale-down, the logs are lost. You need to preserve logs from terminated instances without modifying the application code. Which solution should you implement?

Show answer & explanation

Correct answer: C

  • C. Enable Cloud Logging agent on the instance and configure it to stream /var/log/app.log to Cloud Logging before shutdown

Correct answer: (C) Cloud Logging agent continuously streams logs in real-time to Cloud Logging, ensuring all logs are preserved even if the instance is terminated. This is the standard GCP approach for log aggregation. Wrong answers: (A) Hourly backups may miss recent logs and require storage management; (B) Shutdown scripts are unreliable during forced termination (scale-down often uses hard termination); (D) Persistent disks persist but do not aggregate logs centrally, defeating the purpose of log preservation for analysis.

Question 13 · Ensuring successful operation

You manage a Pub/Sub topic that receives approximately 1 million messages per day. A new subscriber is consistently failing to acknowledge messages within the default 10-second deadline, causing message redelivery and processing duplicates. You want to minimize duplicate processing and reduce redelivery rates. What should you do?

Show answer & explanation

Correct answer: A

  • A. Implement idempotency in your subscriber application and increase the ack deadline to provide more processing time

Option 3 is best because it combines two key fixes: (1) increasing the ack deadline gives the subscriber more time to process before redelivery, and (2) implementing idempotency ensures that any redelivered messages are handled gracefully without duplicates. Option 0 is incorrect—message retention period doesn't affect ack deadlines; it only controls how long undelivered messages are kept. Option 1 is a partial fix (increasing ack deadline is correct) but doesn't address handling duplicate redeliveries. Option 2 is overkill and unnecessary; the issue isn't topic throughput but subscriber processing speed.

Question 14 · Ensuring successful operation

You manage a GKE cluster and need to perform a node pool upgrade from Kubernetes 1.25 to 1.26. You want to ensure zero downtime for your production workloads. What is the correct sequence of steps?

Show answer & explanation

Correct answer: B

  • B. Create a new node pool with Kubernetes 1.26, migrate workloads to the new pool, then delete the old pool

Option 2 is the safest approach for zero-downtime upgrades in a production environment. By creating a new node pool, you can migrate workloads gradually and safely, minimizing risk. Option 0 is dangerous—upgrading the master first creates version skew, and immediately upgrading all nodes causes downtime. Option 1 relies on auto-upgrades which you don't control and may not be fast enough. Option 3 violates the GKE upgrade sequence; the master must be upgraded before nodes. In GKE, the master is always upgraded first, but for minimal downtime with existing workloads, the blue-green node pool approach (option 2) is preferred.

Question 15 · Ensuring successful operation

You are investigating a production issue in your GKE cluster where node pool scaling is not responding to increased workload demand. Metrics show that CPU usage is at 85%, but new Pods are failing to schedule. What are the three most likely causes? (Select THREE)

Select 3 answers.

Show answer & explanation

Correct answers: A, C, E

  • A. The node pool has a maximum node limit that has been reached
  • C. The node pool's autoscaler is disabled or the autoscaling configuration is missing
  • E. Pods have resource requests that exceed the available capacity on existing nodes

The three most likely causes of scheduling failures despite high CPU are: (0) the node pool has reached its max node limit, preventing autoscaling from adding more nodes; (2) Pods request more resources than available nodes can provide, blocking scheduling even if nodes exist; and (3) autoscaling is disabled or misconfigured, so no new nodes are created. Option 1 is unlikely—API server overload typically manifests as slow API responses, not Pod scheduling failures. Option 4 is a possibility but less common than resource request mismatches or autoscaler misconfiguration. Option 5 refers to machine type size, which is a configuration issue not a scaling response issue.

Question 16 · Ensuring successful operation

Your organization uses Cloud Logging to store audit logs for compliance. You have a retention policy set to 30 days, but a recent regulation change requires you to keep logs for 2 years. You also want to move logs older than 90 days to cheaper cloud storage. Which two steps are necessary to meet both requirements? (Select TWO)

Select 2 answers.

Show answer & explanation

Correct answers: A, E

  • A. Increase the Cloud Logging retention policy to 730 days (2 years)
  • E. Create a Cloud Logging sink that exports logs older than 90 days to Cloud Storage

To meet the requirements, you must (0) increase the Cloud Logging retention policy to at least 730 days to comply with the 2-year retention mandate, and (1) create a sink to export logs to Cloud Storage so they can be archived cheaply after 90 days. Option 2 is redundant—you simply update the existing policy; you don't delete and recreate. Option 3 is a supporting step but not strictly necessary for exporting logs to Cloud Storage (the sink itself handles the export). Option 4 (BigQuery) is an alternative but not necessary if Cloud Storage is the target. Option 5 (storage.admin) is overly permissive; 'storage.objectCreator' is sufficient.

Question 17 · Configuring access and security

A developer on your team needs to list Cloud Storage buckets in a project but must NOT be able to read or modify bucket contents or any other resources. Which predefined IAM role should you grant them at the project level?

Show answer & explanation

Correct answer: B

  • B. roles/viewer

roles/viewer (Project Viewer) grants read-only access to all project resources, including the ability to list Cloud Storage buckets, without any write permissions — satisfying least privilege for this task. roles/storage.objectViewer allows reading object data and metadata inside buckets but does NOT grant permission to list buckets at the project level. roles/storage.legacyBucketReader is a bucket-level role (not project-level) and grants read access to a specific bucket's metadata and objects. roles/storage.admin grants full control over all Storage resources, violating least privilege.

Question 18 · Configuring access and security

A team member has roles/editor assigned at the project level but cannot create a service account. An organization policy query shows no constraints on service account creation. What is the MOST likely reason?

Show answer & explanation

Correct answer: D

  • D. The iam.serviceAccounts.create permission is not included in the Editor role

The correct answer is that iam.serviceAccounts.create is not included in the Editor role. While Editor is a broad role, it does not include the ability to create service accounts; only the Owner role and specific IAM Admin roles (like roles/iam.serviceAccountAdmin) include that permission. Custom roles cannot override primitive roles. Blanket deny policies would show in a policy query. Folder-level organization policies would appear in a constraint search.

Question 19 · Configuring access and security

You are reviewing audit logs for a sensitive BigQuery dataset. You need to see who queried the data and when, but the Admin Activity logs do not contain this information. What must you check or enable?

Show answer & explanation

Correct answer: C

  • C. Enable Data Access logs for the dataset

The correct answer is to enable Data Access logs. Admin Activity logs record administrative actions like creating datasets or changing IAM policies, but not query execution. Data Access logs record when data is read, which includes BigQuery queries. These logs are disabled by default and must be explicitly enabled. Increasing retention period does not add new data. The logging.viewer role allows viewing logs but doesn't enable them. The Cloud Console query history is a separate feature and not an audit log.

Question 20 · Configuring access and security

You are implementing a multi-project setup where a service account monitor@monitoring-proj.iam.gserviceaccount.com in the monitoring project needs to read metrics from Compute Engine instances in a separate project called workload-proj. Which approach correctly implements this cross-project access with least privilege?

Show answer & explanation

Correct answer: E

  • E. Grant the monitoring service account 'Monitoring Viewer' role on workload-proj to allow reading metrics.

The correct answer is option 3. The Monitoring Viewer role (roles/monitoring.viewer) provides read-only access to monitoring data across projects, which is the least-privilege way to allow a service account to read metrics from another project. Option 1 is incorrect because granting Editor is excessive and violates the principle of least privilege. Option 2 is incorrect because Compute Viewer is for viewing compute resources themselves, not monitoring metrics, and API keys are not used for service account authentication. Option 4 is incorrect because Workload Identity is primarily for GKE pods to authenticate to Google Cloud APIs within the same cluster; while it can work cross-project, it's not the standard approach for a service account in one project accessing another. Option 5 describes a valid mechanism but is more complex than needed here; the direct role grant (option 3) is simpler and equally secure.

Pick an answer on each question to check it. 20 questions in this test.

231 more Google Cloud ACE questions

Sign up free to start practising, or subscribe (from $4.97/mo) for the full 251-question bank, flashcards and timed mock exams.

Google Cloud Associate Cloud Engineer course overview and study guides →