Skip to content

Google Cloud

Associate Cloud Engineer

Exam 1 · 52 questions · Untimed · Choose another exam

  1. Question 1 of 311A developer needs to test a script that interacts with a Cloud Storage bucket. The script is designed to run on a VM using a specific service account app-sa@project.iam.gserviceaccount.com. To test locally on their workstation without downloading long-lived keys, the developer wants to impersonate this service account. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Grant the developer the roles/iam.serviceAccountTokenCreator role on the service account and instruct them to use the --impersonate-service-account flag.

    Granting the Token Creator role enables the developer to generate short-lived credentials via impersonation. Downloading JSON or P12 keys introduces severe security risks, while the Service Account User role only allows attaching identities to resources, not local impersonation.

  2. Question 2 of 311You are deploying a workload to GKE that needs to pull private container images from an Artifact Registry repository located in the same project. You want to follow the principle of least privilege and avoid managing static keys. How should you configure access?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Configure Workload Identity to bind the Kubernetes Service Account (KSA) to a Google Service Account (GSA) with the Artifact Registry Reader role.

    Configuring Workload Identity allows pods to securely impersonate a dedicated Google service account without managing long-lived keys. For the exam, always select Workload Identity over static JSON keys or node-level configurations to enforce least privilege in GKE.

  3. Question 3 of 311Your application generates extensive log files stored in a Cloud Storage bucket. These logs are critical for troubleshooting during the first 60 days. After that, they are required solely for regulatory compliance, will likely never be read again, and must be kept for 3 years. You need the most cost-effective storage solution. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Configure a Lifecycle rule to change the storage class to Archive Storage after 60 days.

    Configuring an object lifecycle rule to transition logs to Archive Storage directly minimizes costs for long-term, rarely accessed compliance data. Moving files to Standard Storage or BigQuery increases expenses, as those services are optimized for frequently accessed, active workloads.

  4. Question 4 of 311You are building an IoT platform that ingests sensor data from 100,000 devices. The devices send readings every second, resulting in a massive volume of write operations. You need a database that can handle millions of writes per second with sub-millisecond latency and scale to store 50 TB of time-series data. What should you use?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Cloud Bigtable

    Cloud Bigtable is the correct choice because it handles massive write throughput and time-series workloads with sub-millisecond latency. BigQuery is optimized for analytical reporting rather than real-time ingestion, and Cloud SQL cannot scale efficiently to millions of writes per second.

  5. Question 5 of 311You are the cloud lead for a company running workloads in multiple projects. The finance team needs to perform complex, granular cost analysis using SQL to join billing data with internal business metrics (e.g., "Cost per customer transaction"). They need this data updated automatically. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Enable detailed usage cost data export to BigQuery.

    Enabling detailed usage cost data export to BigQuery automatically streams granular billing data for SQL analysis. Exporting to Google Sheets or downloading CSVs lacks the necessary automation, while using the API requires unnecessary custom pipeline maintenance.

  6. Question 6 of 311Your company operates in a regulated industry with strict data residency requirements. The compliance officer has mandated that all new cloud resources (VMs, Buckets, Databases) must be created ONLY in European regions (europe-west1, europe-west4, europe-north1). This restriction must apply to all projects in the organization. You need to enforce this policy so that developers receive an error immediately if they attempt to create resources in non-compliant regions (e.g., us-central1). What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Configure an Organization Policy with the gcp.resourceLocations constraint and set the allowed values to the European regions.

    Configuring an Organization Policy with the gcp.resourceLocations constraint immediately prevents resource creation outside allowed regions. IAM conditions or deny policies require massive administrative overhead, while reactive deletion functions fail to block non-compliant resources immediately.

  7. Question 7 of 311A data science team is evaluating accelerators for two separate workloads. Workload A is a large-scale transformer model training job using JAX, with fixed input shapes, large batch sizes, and dominated by dense matrix operations. Workload B is early-stage research where engineers frequently experiment with custom PyTorch operations and need the flexibility to iterate quickly without recompiling. Which accelerator mapping is correct?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Workload A: Cloud TPU. Workload B: GPU.

    Cloud TPUs are optimized for large-scale matrix operations with fixed shapes, making them perfect for Workload A. GPUs are the correct choice for Workload B because they handle custom PyTorch operations and rapid iteration without the overhead of graph compilation.

  8. Question 8 of 311Your company runs a nightly batch processing job that takes approximately 3-4 hours to complete. The job requires a specific amount of RAM and CPU to run efficiently. The application has built-in checkpointing, so if it is interrupted, it can resume from the last saved state. You need to migrate this job to Google Cloud with the goal of minimizing compute costs. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Run the job on Compute Engine Spot VMs and use a shutdown script to save the checkpoint.

    Running the job on Compute Engine Spot VMs minimizes costs while handling preemption via checkpointing. Shut down scripts capture the preemption notice to save progress, whereas serverless options like Cloud Run or App Engine lack the cost efficiency for long-running batch jobs.

  9. Question 9 of 311You are designing a global web application that must be deployed in three specific regions: us-central1, europe-west1, and asia-east1. You need a single global IP address that routes users to the closest healthy region and automatically fails over if a region goes offline. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Deploy Managed Instance Groups (MIGs) in each region and add them as backends to a Global External HTTP(S) Load Balancer.

    A Global External HTTP(S) Load Balancer provides a single anycast IP and instantly routes traffic to the closest healthy region. DNS-based routing relies on TTLs causing delays during failover, and Cloud CDN alone lacks the necessary health checking backend routing capabilities.

  10. Question 10 of 311Your security team mandates that junior operators must be able to view the configuration details of Compute Engine instances (e.g., machine type, disk size) but must strictly be prevented from starting, stopping, or deleting them. You need to create a custom role to satisfy this requirement. Which permissions should you include?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. compute.instances.get and compute.instances.list

    Including compute.instances.get and list grants strictly read-only access to view machine configurations. Granting start, stop, or wildcard permissions violates the requirement, while setMetadata is a write operation that could allow unauthorized privilege escalation.

  11. Question 11 of 311You are deploying a 3-tier application with web, application, and database layers. The application VMs are in subnet-a, and the database VMs are in subnet-b. For security compliance, you need to configure a firewall rule that allows traffic to the database on port 5432 only from the specific application VMs, while denying traffic from other VMs in subnet-a. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create a firewall rule with the target service account of the database VMs and source service account of the application VMs.

    Using service accounts for both source and target filtering ensures only the specific application VMs access the database. Network tags present security vulnerabilities since users could attach them to unauthorized machines, while static IPs break during autoscaling.

  12. Question 12 of 311Your organization's security team requires that all audit logs from your production project be retained for 3 years to satisfy compliance regulations. Additionally, security analysts need to run complex SQL queries against these logs to identify unauthorized access patterns. Cloud Logging currently retains logs for only 30 days. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create a Log Router sink to export the audit logs to a BigQuery dataset.

    Creating a Log Router sink to BigQuery satisfies both long-term retention and complex SQL analysis requirements. Cloud Storage archives logs but complicates SQL queries, while relying on Cloud Logging's custom retention is expensive and less analytically capable.

  13. Question 13 of 311Your organization has two Google Cloud projects: frontend-proj and backend-proj. Each project has its own Custom VPC network. The frontend application in frontend-proj needs to connect to the database in backend-proj using internal private IP addresses to minimize latency and avoid egress costs. The IP ranges of the two VPCs do not overlap. You want to establish this connectivity with the least operational overhead. What should you configure?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Create a VPC Network Peering connection between the two VPC networks.

    VPC Network Peering provides internal IP connectivity between two networks, keeping traffic on Google's private backbone with minimal latency. Shared VPC requires complex resource migration to a host project, resulting in significantly higher operational overhead than peering.

  14. Question 14 of 311You have just applied a rolling update to a deployment named frontend-app in your GKE cluster. Users immediately report 500 errors. You need to revert the deployment to the previous stable revision as quickly as possible. Which command should you run?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. kubectl rollout undo deployment/frontend-app

    The kubectl rollout undo command instantly reverts a deployment to its previous stable revision using built-in history. Applying an older YAML file works technically but requires locating the exact file, which introduces unnecessary delay during a production outage.

  15. Question 15 of 311Your security team has issued a new mandate for a sensitive Cloud Storage bucket containing financial records. They require that access to objects must be uniform: if a user has access to the bucket, they should have access to all objects within it. Individual object-level permissions (ACLs) must be disabled to prevent accidental data exposure. What configuration should you apply?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Enable Uniform Bucket-Level Access (UBLA) on the bucket.

    Enabling Uniform Bucket-Level Access disables Access Control Lists, ensuring permissions are managed exclusively through bucket-level IAM policies. Setting default object ACLs to private leaves the ACL system active, meaning users could still modify individual object permissions later.

  16. Question 16 of 311You are responsible for the reliability of a Managed Instance Group (MIG) serving a production API. You need to ensure the operations team is notified via email whenever the average CPU utilization of the instance group exceeds 80% for a duration of more than 5 minutes. What should you create?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Configure a Cloud Monitoring Alerting Policy with a metric threshold condition for the MIG, setting the duration to 5 minutes.

    A Cloud Monitoring Alerting Policy natively tracks infrastructure metrics and sends notifications when sustained thresholds are breached. Writing custom Cloud Run Functions to poll APIs duplicates existing managed services and introduces unnecessary code maintenance.

  17. Question 17 of 311You are designing the network architecture for a global media application. The production environment requires the lowest possible latency and high availability for users worldwide. However, the development environment is cost-sensitive and is hosted in a single region. How should you configure the Network Service Tiers?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Use Premium Tier for the production project and Standard Tier for the development project.

    Premium Tier routes traffic over Google's private global backbone using cold-potato routing, providing the lowest latency for your production environment. Standard Tier uses cheaper public ISP routing, making it the most cost-effective choice for your development environment where performance is less critical.

  18. Question 18 of 311Your development team uses Artifact Registry to store Docker container images in a repository called "app-images" in us-central1. The team now wants to also store their Maven Java packages and npm Node.js packages in the same location to simplify artifact management. They ask you to configure the existing "app-images" repository to accept Maven and npm artifacts in addition to Docker images. What should you tell the team?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create separate repositories for Maven and npm, as each Artifact Registry repository supports only a single format that cannot be changed after creation

    Artifact Registry repositories are immutable and permanently bound to a single format specified at creation. You must create separate repositories for Docker, Maven, and npm packages because Google enforces strict one-to-one mappings between repositories and artifact formats.

  19. Question 19 of 311Your company wants to migrate containerized workloads to Google Kubernetes Engine (GKE). The operations team wants to minimize ongoing maintenance overhead. Specifically, they require a solution where Google manages the node configuration, scaling, security patching, and node health monitoring entirely. You should not be able to SSH into nodes or manage node pools directly. Which GKE mode should you choose?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. GKE Autopilot

    GKE Autopilot is a fully managed mode where Google handles node provisioning, scaling, and security patching. Standard mode fails the requirements because you still manage the underlying node pools and retain SSH access to the nodes.

  20. Question 20 of 311You have configured a Compute Engine VM with a specific application stack, security patches, and custom configuration files. You need to launch 50 identical instances of this VM across three different regions (us-central1, europe-west1, asia-east1) to support a global launch. You need the most efficient and scalable method to achieve this. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Create a custom image from the source VM's boot disk and reference this image in your Instance Templates.

    Creating a custom image from the boot disk lets you reference it globally within instance templates for immediate deployments. Using startup scripts increases boot times because they must download and install dependencies every time a new VM initializes.

  21. Question 21 of 311Your development team needs to deploy a stateless HTTP API. The application receives unpredictable traffic spikes, ranging from 0 requests per minute at night to 1000 requests per minute during the day. To minimize costs, the solution must scale to zero when idle and scale up instantly during spikes. What should you use?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Cloud Run with autoscaling and min-instances set to 0.

    Cloud Run natively supports scaling to zero when idle and rapidly scales up to handle unpredictable traffic spikes. App Engine Flexible cannot scale to zero, and GKE requires additional tooling to achieve similar scale-from-zero behavior.

  22. Question 22 of 311You are managing a fleet of production virtual machines that host critical business applications. Your disaster recovery plan requires daily backups of the persistent disks at 2:00 AM local time. These backups must be retained for exactly 30 days to comply with data retention policies. You need a fully managed solution that minimizes operational overhead and does not require maintaining custom scripts. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Create a Snapshot Schedule in Compute Engine with the required frequency and retention policy, and attach it to the persistent disks.

    Compute Engine snapshot schedules provide native automated backups with configurable frequencies and retention policies, satisfying the requirements without custom scripts. Avoid cron jobs or Cloud Functions, which require you to write and maintain custom code for creation and deletion.

  23. Question 23 of 311Your web application serves a mix of content through an external Application Load Balancer with Cloud CDN enabled. The application serves static assets (images, CSS, JavaScript) that should be cached, but your origin server doesn't currently set Cache-Control headers on responses. You want Cloud CDN to automatically cache these static assets without requiring changes to your origin server configuration. Which Cloud CDN cache mode should you configure for this backend service?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. CACHE_ALL_STATIC - automatically caches static content based on Content-Type, even when origin doesn't set cache headers

    The CACHE_ALL_STATIC mode caches static content based on Content-Type headers even if the origin provides no cache directives. The USE_ORIGIN_HEADERS mode fails here because the origin currently sets no headers, meaning nothing would be cached.

  24. Question 24 of 311You want to enforce strict budget controls on a sandbox project. The requirement is to automatically remove all permissions for the project's developers if the monthly spend exceeds 90% of the budget. You need a solution that requires no manual intervention. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Create a Budget with a Pub/Sub topic, and trigger a Cloud Run Function to remove IAM bindings.

    Cloud Budgets can publish notifications to Pub/Sub when spending thresholds are crossed, allowing an automated Cloud Run Function to revoke IAM permissions. Email alerts fail the requirement because they require manual human intervention to enforce the access changes.

  25. Question 25 of 311Your organization is deploying a large fleet of microservices on Compute Engine. You want to implement firewall rules that automatically apply to VMs based on their identity (Service Account). You want to avoid the operational overhead of manually managing network tags every time a VM is created or destroyed by an autoscaler. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Configure the firewall rules to use Service Accounts as the source and target.

    Using service accounts as targets in VPC firewall rules binds security to VM identity rather than mutable network tags. Tags defined in instance templates work for basic deployments, but service accounts provide stronger cryptographic identity and avoid manual tag management.

  26. Question 26 of 311Your organization wants to centralize SSH access management for all Compute Engine Linux instances. You need to ensure that developers can SSH into VMs using their Google Workspace credentials. You want to avoid managing individual SSH keys in metadata. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Enable OS Login by setting the metadata enable-oslogin=TRUE at the project level, and grant developers the roles/compute.osLogin role.

    Enabling OS Login links Linux accounts to Google Cloud identities, automatically managing SSH keys through IAM without manual metadata updates. While IAP TCP forwarding secures network connectivity, it does not handle operating system authentication, making OS Login the required component.

  27. Question 27 of 311A developer has installed the Google Cloud CLI (gcloud) on a new workstation. They need to authenticate using their user account and ensure that all commands run against the project my-core-app by default. Which TWO commands must they run?

    Select 2 answers.

    Show answer & explanation

    Correct answer: C. gcloud config set project my-core-app · E. gcloud auth login

    Use gcloud auth login to authenticate interactively with user credentials, and gcloud config set project to define the default project. Avoid application-default login because it provisions credentials for application code libraries rather than the CLI itself.

  28. Question 28 of 311Your application running on GKE experiences variable traffic. You need the number of Pod replicas to automatically increase when the average CPU utilization across all pods exceeds 70%, and decrease when it drops below that target. What should you create?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. HorizontalPodAutoscaler (HPA)

    The HorizontalPodAutoscaler automatically adjusts the number of pod replicas based on observed CPU utilization. The VerticalPodAutoscaler fails this requirement because it adjusts CPU and memory requests instead of scaling the replica count horizontally.

  29. Question 29 of 311You have an application running on a Compute Engine instance that needs to write custom metrics to Cloud Monitoring. To follow the principle of least privilege, which identity and role should you use?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Attach a Service Account to the instance with the roles/monitoring.metricWriter role.

    Attach a dedicated service account with the monitoring.metricWriter role to grant write permissions via Application Default Credentials. Avoid downloading JSON keys, as Google recommends against manual key management when native service account attachment is available.

  30. Question 30 of 311Your company's public-facing web application behind an external Application Load Balancer is experiencing frequent DDoS attacks from multiple IP addresses. Security logs show that some attackers are sending over 100 requests per minute from single IP addresses, overwhelming your backend services. You need to protect your application by automatically blocking IP addresses that exceed this threshold while still allowing legitimate traffic through. What is the most effective Cloud Armor configuration for this requirement?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create a Cloud Armor security policy with a rate-based ban rule that blocks IPs exceeding 100 requests per minute for a specified ban duration

    Cloud Armor rate-based ban rules automatically block IPs exceeding a specified request threshold, mitigating DDoS attacks at the network edge. Manually adding deny rules fails the automation requirement because it is reactive and cannot scale against rapidly changing attackers.

  31. Question 31 of 311A financial services company is building a fraud detection system that processes millions of transactions per second. The architecture requires a messaging system that provides exactly-once delivery guarantees and must be compatible with existing applications using the Apache Kafka API. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Use Google Cloud Managed Service for Apache Kafka.

    Google Cloud Managed Service for Apache Kafka provides native API compatibility and exactly-once delivery semantics without operational overhead. Self-managing Kafka on Compute Engine or GKE fails the operational efficiency requirement because your team must handle all patching and clustering manually.

  32. Question 32 of 311You are setting up a new project my-app-dev for a team of developers. They need full control to create, modify, and delete Compute Engine instances within this specific project. However, for security reasons, they must not have any access to resources in your production projects. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Grant the roles/compute.instanceAdmin.v1 role to the developer group on the my-app-dev project.

    Granting compute.instanceAdmin.v1 on the specific project perfectly enforces least privilege, allowing developers to manage VMs without affecting production. Avoid granting broad primitive roles like Editor, or granting permissions at the organization level, which violates your security boundaries.

  33. Question 33 of 311Your organization assigns costs to different departments using labels (e.g., dept:marketing, dept:sales). You need to see a visualization of the last 30 days of spending, grouped by these labels, directly in the Google Cloud Console. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Use the Reports view in the Cloud Billing Console and group by "Label".

    The Reports view in the Cloud Billing Console provides native visualization of cost trends grouped by labels. Exporting to BigQuery is useful for advanced reporting, but it is unnecessary for quickly viewing a month of spending directly in the console.

  34. Question 34 of 311Your organisation currently has three teams: Finance, Engineering, and Marketing, each with projects in their own folder. A new auditor needs read-only access to all Cloud Storage buckets across the organisation. This access must automatically extend to any new projects created within the existing folders, as well as to any entirely new team folders added to the organisation in the future. What is the most efficient way to grant this access?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Grant the auditor roles/storage.objectViewer at the organisation level.

    Granting roles at the organization level leverages resource hierarchy inheritance, automatically applying permissions to all current and future folders and projects. Granting access at the folder or project level requires repeating the process manually whenever new resources are created.

  35. Question 35 of 311You are migrating a legacy Java application to Google Cloud. The application depends on specific Linux kernel modules and a custom OS configuration that was tuned manually over years. The application is not containerized, and the team does not have the resources to refactor it into containers immediately. What is the most appropriate compute service?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Compute Engine

    Compute Engine provides full administrative control over the operating system, allowing you to install specific kernel modules and customize configurations. Fully managed platforms like Cloud Run or App Engine abstract the underlying operating system and restrict kernel-level access.

  36. Question 36 of 311Your application running on Compute Engine needs to access Cloud Storage buckets in a different project. For security reasons, your organization's policy prohibits downloading and storing service account JSON key files. You need to grant the application temporary access to a service account (storage-admin@other-project.iam.gserviceaccount.com) that has the necessary permissions to the buckets, without using long-lived credentials. What is the recommended approach to provide this access?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Grant the Compute Engine service account the Service Account Token Creator role on storage-admin@other-project.iam.gserviceaccount.com, then use the generateAccessToken API to create short-lived credentials

    Granting the Token Creator role allows the VM service account to impersonate the target account and generate short-lived access tokens. This avoids downloading static JSON keys, which pose security risks, and keeps cross-project access securely auditable.

  37. Question 37 of 311You are managing a VPC network in the us-central1 region for a production application. The current subnet app-subnet has a CIDR range of 10.0.1.0/24, which provides 254 usable IP addresses. You currently have 200 running instances in this subnet. Your team needs to deploy an additional 500 virtual machines into this same subnet to support a new marketing campaign. You must accommodate these new instances without recreating the subnet or disrupting the connectivity of the existing running instances. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Use the gcloud compute networks subnets expand-ip-range command to increase the prefix length to /21.

    The expand-ip-range command lets you increase a subnet capacity in place without disrupting existing running instances. Secondary ranges are only for alias IPs and containers, not for assigning primary internal IPs to new Compute Engine VMs.

  38. Question 38 of 311Your platform engineering team wants to manage Google Cloud resources—such as Cloud SQL instances, Pub/Sub topics, and IAM policies—using the same Kubernetes-style YAML manifests and GitOps workflows they use for their applications. They want to apply these manifests to the GKE cluster using kubectl. What should you install and configure?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Config Connector

    Config Connector is a Kubernetes add-on that lets you manage Google Cloud resources using standard YAML manifests via kubectl. Terraform flows in the opposite direction, while Deployment Manager uses entirely different configuration templates.

  39. Question 39 of 311Your team is developing a high-traffic gaming leaderboard application. The application frequently queries the same database records, causing high load on the primary Cloud SQL instance. You need to implement an in-memory caching layer that supports the Redis protocol to reduce database load and improve response times.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Deploy a Memorystore for Redis instance and configure the application to cache results there.

    Memorystore for Redis provides a fully managed in-memory caching layer that natively supports the Redis protocol. Self-managing a cluster on GKE or VMs adds unnecessary operational overhead, while Memcached does not support the required protocol.

  40. Question 40 of 311Your finance department uploads monthly PDF invoices to a Cloud Storage bucket. These documents are accessed frequently during the first 30 days for accounting reviews. After 30 days, they are rarely accessed but must be retained for 7 years to meet tax compliance regulations. You want to minimize storage costs automatically without changing how users access the files. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Configure an Object Lifecycle Management rule to downgrade storage class to Nearline after 30 days and to Coldline after 365 days.

    Object Lifecycle Management automatically transitions storage classes based on age, minimizing costs without custom code. Jumping directly to Archive after thirty days incurs early deletion fees if accessed before the mandatory year elapses.

  41. Question 41 of 311Your business intelligence team is experiencing slow query performance on their Looker dashboards that query BigQuery datasets. These dashboards run repeated queries on a few key tables (approximately 5 GB total) throughout the day to display real-time metrics. You want to accelerate these specific dashboard queries without affecting other BigQuery workloads in your project. What is the most effective way to configure BigQuery for this use case?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create a BI Engine reservation with sufficient memory capacity and designate the key dashboard tables as preferred tables

    Creating a BI Engine reservation with preferred tables accelerates repeated dashboard queries by caching table data in memory. BigQuery result caching only works for exact duplicate queries, whereas BI Engine accelerates similar queries across your preferred tables.

  42. Question 42 of 311A CI/CD pipeline stores temporary build artifacts in a specific Cloud Storage bucket. To save costs, you want to ensure that any artifact older than 90 days is automatically removed. No one needs these files after this period. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Configure a Lifecycle rule with the action Delete and condition Age: 90 days.

    Configuring a Lifecycle rule with a Delete action and an age condition automatically removes old objects without custom scripts. Retention policies prevent deletion for compliance, which is the exact opposite of the required automatic cleanup behavior.

  43. Question 43 of 311Your company uses Okta as its corporate identity provider. Employees need to access the Google Cloud console and run gcloud CLI commands using their existing Okta credentials, without creating separate Google Cloud Identity accounts for each user. Your security policy also prohibits long-lived credentials. Which Google Cloud feature should you configure?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Workforce Identity Federation, by creating a workforce identity pool and an Okta OIDC or SAML 2.0 provider, so employees can use SSO with short-lived tokens and no Cloud Identity accounts are required.

    Workforce Identity Federation allows employees to sign in using external identity providers with short-lived tokens, avoiding separate Cloud Identity accounts. Workload Identity Federation is designed for automated workloads and code pipelines, not interactive human users.

  44. Question 44 of 311A data science team wants to train a custom TensorFlow model on Google Cloud and then serve it as a managed online prediction endpoint for low-latency real-time inference requests. They want the platform to handle the serving infrastructure automatically, with no Kubernetes clusters or VMs to manage. Which service should they use?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Gemini Enterprise Agent Platform, which provides managed custom model training and a fully managed online prediction service that deploys models to endpoints without requiring infrastructure management.

    Vertex AI provides a fully managed environment for custom model training and deploys models to online prediction endpoints without infrastructure management. BigQuery ML is excellent for training models using SQL on structured data but does not serve real-time custom TensorFlow endpoints.

  45. Question 45 of 311You have a web application running on a managed instance group of VMs in subnet-a (10.0.1.0/24). These VMs need to connect to a Cloud SQL database instance located in subnet-b (10.0.2.0/24) using its Private IP. Your security team requires strict control: only the specific application VMs should be allowed to reach the database subnet, not any other VMs that might be deployed in subnet-a in the future. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Apply a specific network tag (e.g., web-app) to the application VMs. Create a VPC firewall rule allowing ingress traffic to subnet-b from the source tag web-app.

    Applying a network tag to your application VMs and using it as the source in a firewall rule provides the required strict access control. Filtering by subnet range is too broad because it would allow future VMs in that subnet to access the database.

  46. Question 46 of 311Your company is migrating a critical on-premises PostgreSQL database to Google Cloud. The database is 5 TB in size and requires extremely high transaction throughput and strong consistency. The application relies on native PostgreSQL extensions and stored procedures. You want a fully managed service that minimizes refactoring. Which service should you choose?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. AlloyDB for PostgreSQL

    AlloyDB for PostgreSQL is fully managed and delivers high transaction throughput while maintaining one hundred percent compatibility with native PostgreSQL extensions. Spanner's PostgreSQL interface lacks support for stored procedures, requiring substantial application refactoring.

  47. Question 47 of 311A developer wants an AI assistant that runs entirely in their terminal, accepts natural-language prompts, can read and write files in their local project, execute shell commands, and help fix bugs or add features to a codebase — all without switching to a browser or IDE. Which Google Cloud tool should they use?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Gemini CLI, an open-source AI agent that runs in the terminal and uses a reason-and-act loop to complete coding tasks, run commands, and manipulate files through natural-language prompts.

    Gemini CLI is an open-source AI agent that runs locally in your terminal to manipulate files and execute commands. Gemini Cloud Assist operates exclusively within the Google Cloud console and cannot interact with your local codebase.

  48. Question 48 of 311You are the Cloud Architect for a startup managing three distinct environments: Development, Staging, and Production. All environments use similar infrastructure definitions but require different resource capacities and project IDs. You want to manage this infrastructure using Terraform while minimizing code duplication and ensuring isolation. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create separate Terraform directories (or workspaces) for each environment and reuse shared modules for infrastructure resources.

    Using separate directories with shared modules ensures complete state isolation and minimizes code duplication. Monolithic files with conditional logic create a massive blast radius, and using a single project violates the requirement for strict environmental isolation.

  49. Question 49 of 311You have discovered that a service account key for a production project was accidentally committed to a public GitHub repository. You suspect attackers are already using it to launch instances. You need to stop all incurring charges immediately and ensure no new resources can be created. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Disable billing on the project.

    Disabling billing on the project immediately stops all billable services and terminates running compute resources. Deleting the compromised service account halts new authentications, but existing access tokens remain valid for up to an hour, so disabling billing is the fastest way to stop incurring charges.

  50. Question 50 of 311You are configuring a Global External Application Load Balancer to serve traffic for a web application spanning three regions. You need to ensure the load balancer accepts HTTP requests and distributes them intelligently to the closest healthy instance group. Which TWO components must you configure?

    Select 2 answers.

    Show answer & explanation

    Correct answer: B. A URL Map to define routing rules for incoming requests. · D. A Backend Service with a configured health check.

    A backend service distributes traffic by relying on health checks to route requests only to available instances. The URL map is also mandatory because it defines the routing rules that direct incoming requests to the correct backend service.

  51. Question 51 of 311A large retail company is migrating 200 legacy servers to Compute Engine VMs across multiple regions. The operations team requires detailed system metrics (memory, disk utilization) and application logs to be centralized in Cloud Logging and Monitoring. You need to ensure the agents are installed and maintained consistently across the fleet with minimal manual intervention. What should you do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Use VM Manager to apply an OS policy that installs and configures the Ops Agent on all VMs.

    Applying an OS policy via VM Manager installs and configures the Ops Agent at scale without manual SSH access. Startup scripts only run during boot, meaning they cannot easily update the agent on already running instances.

  52. Question 52 of 311You are troubleshooting a critical issue on a Compute Engine instance named web-server-1. You need to quickly find all log entries with a severity level of ERROR that occurred in the last 24 hours specifically for this instance. Which filter should you use in the Logs Explorer?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. resource.type="gce_instance" AND resource.labels.instance_id="[INSTANCE_ID]" AND severity="ERROR" (Assume [INSTANCE_ID] matches web-server-1)

    The correct filter uses the exact resource type and the numeric instance ID along with the structured severity field. Filtering by the instance name fails because the labels require the unique numeric identifier rather than the human-readable string.

Study on mobile

Get CertPunch for iOS or Android.

Website sessions are saved in this browser tab. They do not transfer to the apps.

Scroll to Top