All practice questions

1591 questions

Question 221Question

An enterprise DevOps team needs to set up a new environment within their Google Cloud resource hierarchy. The team requires authorization to create new projects exclusively under a designated folder named 'Mobile-Backend' and link those projects to the company's central Billing Account. Following the principle of least privilege, which TWO IAM roles must be granted to the DevOps team principal?

Select all that apply

Show answer & explanation

Answer: Project Creator (roles/resourcemanager.projectCreator) on the 'Mobile-Backend' folder; Billing Account User (roles/billing.user) on the central Billing Account

Answer

To allow creating projects in a specific folder and linking them to a central billing account under least privilege, the DevOps team must be granted the Project Creator role scoped to the 'Mobile-Backend' folder and the Billing Account User role on the target Billing Account.
Creating a project inside a specific folder requires the Project Creator role granted on that folder resource. Linking any project to a billing account requires the Billing Account User role granted directly on the target billing account resource. Together, these two roles achieve the goal using least privilege.

Step-by-Step Solution

1
Determine the role required to create projects within a specific resource hierarchy folder.
The Project Creator role (roles/resourcemanager.projectCreator) provides the resourcemanager.projects.create permission.
Scoping this role to the 'Mobile-Backend' folder ensures project creation is constrained only to that directory.
2
Determine the role required to associate newly created projects with a billing account.
The Billing Account User role (roles/billing.user) provides the billing.resourceAssociations.create permission on the billing account.
Granting this on the specific Billing Account allows linking projects without exposing payment settings or account administration.

Key Concept

Least privilege IAM role delegation for Google Cloud project creation and billing account linking.
Estimated Time:2m 0s
Question 222Question

A financial technology company is designing the Google Cloud Compute Engine resource strategy for two distinct backend services:
1. A fault-tolerant, stateless batch risk analytics service that processes asynchronous job queues.
2. A mission-critical relational database service requiring continuous 24/7 availability with predictable capacity.

Which of the following compute provisioning strategies should the cloud engineer implement? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Provision Spot VMs for the fault-tolerant batch risk analytics workload to minimize compute costs.; Purchase Committed Use Discounts (CUDs) for the vCPU and memory footprint of the continuous relational database workload.

Answer

Provision Spot VMs for the fault-tolerant batch risk analytics workload, and purchase Committed Use Discounts (CUDs) for the continuous relational database workload.
The correct strategy combines Spot VMs for the fault-tolerant risk analytics workload and Committed Use Discounts (CUDs) for the 24/7 database. Spot VMs lower compute costs substantially for stateless workloads that tolerate preemption. For steady 24/7 database workloads, purchasing a 1-year or 3-year Committed Use Discount yields maximum cost savings while preserving continuous instance availability.

Step-by-Step Solution

1
Analyze the fault-tolerant batch risk analytics service requirements.
Identified that the service is stateless and queue-based, meaning job failures or instance preemptions can be retried without data corruption.
Spot VMs are designed for stateless, fault-tolerant workloads and provide up to 60-91% cost reductions.
2
Analyze the relational database service requirements.
Identified that the service requires uninterrupted 24/7 operation with steady, predictable vCPU and memory resource consumption.
Committed Use Discounts (CUDs) provide the deepest pricing discounts for steady-state baseline workloads requiring 1-year or 3-year commitments without node preemption risks.

Key Concept

Compute Engine Machine Provisioning and Pricing Models (Spot VMs vs. Committed Use Discounts)
Question 223Question

An enterprise SaaS provider is evaluating Compute Engine resource configurations for two new background processing workloads:

1. Workload Alpha: An event-driven image rendering worker pool that processes decoupled queue messages. Each task takes 3 to 10 seconds to process, operates statelessly, and can tolerate immediate instance termination without data loss.
2. Workload Beta: A stateful, high-throughput in-memory database cache node that requires 128 GB of RAM, runs continuously 24/7, and cannot tolerate unexpected interruptions.

Which TWO cost-effective and architecturally suitable provisioning strategies should the lead cloud architect select for these Compute Engine workloads? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Provision Spot Virtual Machines for Workload Alpha to take advantage of significant compute discounts while maintaining fault tolerance via queue re-processing.; Purchase a 1-year or 3-year Committed Use Discount (CUD) for the memory-optimized or custom machine family resources required by Workload Beta.

Answer

The architect should provision Spot Virtual Machines for the stateless queue processing workload (Workload Alpha) and purchase a 1-year or 3-year Committed Use Discount for the continuous, stateful memory workload (Workload Beta).
For stateless, fault-tolerant queue workers (Workload Alpha), Spot VMs drastically cut compute costs without risking application failure. For 24/7 stateful, high-memory database workloads (Workload Beta), Committed Use Discounts offer the highest cost reduction while ensuring standard VM stability.

Step-by-Step Solution

1
Analyze the fault tolerance and lifecycle requirements for Workload Alpha.
Workload Alpha is stateless, event-driven, short-lived, and tolerant of unexpected termination.
Fault-tolerant, stateless batch and queue processing workloads are ideal candidates for Spot VMs to minimize compute expenses.
2
Analyze the uptime, performance, and state requirements for Workload Beta.
Workload Beta runs continuous 24/7 operations and requires consistent, uninterruptible high memory (128 GB RAM).
Stateful and uninterruptible workloads cannot be hosted on Spot/Preemptible instances; long-term continuous availability demands Committed Use Discounts (CUDs) for optimal financial planning.
3
Select the correct combination of Compute Engine options based on suitability and cost optimization.
Combine Spot VMs for Workload Alpha with Committed Use Discounts for Workload Beta.
This strategy maximizes savings across both interruptible stateless processing and steady-state memory infrastructure.

Key Concept

Compute Engine Workload Planning: Spot VM Suitability vs Committed Use Discounts
Question 224Question

An enterprise logistics company runs a continuous 24/7 real-time vehicle tracking pipeline on Google Cloud. The application requires a precise capacity ratio of 3 vCPUs to 24 GB of memory to process telemetry data streams without memory throttling. The workload is strictly non-fault-tolerant and cannot tolerate instance terminations or preemption. Which Compute Engine resource planning strategy provides the most cost-effective configuration while satisfying all performance and operational constraints?

Show answer & explanation

Answer: Provision a Compute Engine VM using a custom machine type configured with 3 vCPUs and 24 GB of RAM, and purchase a Committed Use Discount for the baseline compute resource usage.

Answer

Provision a Compute Engine VM using a custom machine type configured with 3 vCPUs and 24 GB of RAM, combined with a Committed Use Discount for the resource capacity.
Configuring a custom machine type allows precise tailoring of 3 vCPUs and 24 GB of RAM, eliminating unnecessary expenditure on unused vCPUs required by standard machine families. Combining this custom configuration with Committed Use Discounts yields optimal cost reduction for steady-state 24/7 workloads that require guaranteed uptime.

Step-by-Step Solution

1
Analyze workload resource requirements and constraints
Workload needs 3 vCPUs and 24 GB RAM, runs continuous 24/7, and cannot tolerate interruptions.
Matching exact resource ratios prevents over-provisioning unused CPU cores.
2
Evaluate machine type selection options
Standard predefined machine types (such as n2-standard-8 with 8 vCPUs / 32 GB RAM) force over-allocation of vCPUs. A custom machine type precisely allocates 3 vCPUs and 24 GB RAM.
Custom machine types allow tailored vCPU and RAM combinations to optimize compute billing.
3
Evaluate pricing model for a 24/7 non-interruptible workload
Spot VMs cannot be used because preemption breaks the availability SLA. Committed Use Discounts (CUDs) offer predictable, deep discounts (up to 57% or 70%) for steady 24/7 baseline capacity.
CUDs apply to custom machine type vCPUs and RAM without risking workload preemption.

Key Concept

Planning Compute Engine machine families, custom machine types, and discounting strategies for steady-state workloads.
Estimated Time:2m 0s
Question 225Question

A media publishing platform is migrating two backend workloads to Google Cloud with distinct operational and cost constraints:

1. Workload 1: A stateless HTTP microservice packaged as a container image that experiences unpredictable web traffic throughout the day. It requires automatic scaling down to zero instances when idle and zero operational maintenance for virtual machine instances or Kubernetes node pools.
2. Workload 2: A nightly batch processing job that runs for several hours. The pipeline is fully fault-tolerant and saves checkpoint progress to Cloud Storage every 5 minutes. The team's primary priority is to minimize compute costs for this batch execution.

Which TWO compute platform strategies should the Cloud Engineer recommend to satisfy these requirements? (Select TWO choices.)

Select all that apply

Show answer & explanation

Answer: Deploy Workload 1 on Cloud Run to leverage serverless container execution with automatic scaling to zero and no infrastructure management.; Deploy Workload 2 on Compute Engine using Spot Virtual Machines (VMs) to significantly reduce compute costs for the fault-tolerant batch job.

Answer

The optimal solution is to deploy Workload 1 on Cloud Run and deploy Workload 2 on Compute Engine using Spot VMs.
Deploying Workload 1 on Cloud Run satisfies all requirements for containerized microservices needing scale-to-zero capability and zero infrastructure maintenance. Deploying Workload 2 on Compute Engine using Spot VMs minimizes compute costs significantly while taking advantage of the job's checkpointing resilience against VM preemption.

Step-by-Step Solution

1
Evaluate Workload 1 requirements (stateless container, unpredictable traffic, scale-to-zero, zero infrastructure management).
Identify Cloud Run as the best fit because it runs arbitrary container images, scales automatically to zero when no HTTP requests arrive, and requires no node or OS management.
Matching workload architecture to the minimal operational overhead serverless compute service.
2
Evaluate Workload 2 requirements (batch processing, nightly run, checkpointing to Cloud Storage, cost minimization as top priority).
Identify Compute Engine Spot VMs as the best fit because Spot VMs provide heavy cost discounts (60-90%) suitable for fault-tolerant batch workloads.
Choosing compute purchasing models based on workload fault tolerance and cost targets.

Key Concept

Selecting GCP compute options based on workload statefulness, operational overhead, and purchasing models.
Estimated Time:1m 30s
Question 226Question

A cloud engineer is tasked with configuring billing for a newly provisioned Google Cloud project (`staging-microservices-prod`). The project must be linked to an existing corporate billing account (`01A2B3-4C5D6E-7F8901`). Adhering strictly to Google Cloud least-privilege security principles, which TWO IAM roles must be granted to the cloud engineer to perform this linking operation? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Billing Account User (`roles/billing.user`) on the target Cloud Billing account; Project Billing Manager (`roles/resourcemanager.projectBillingManager`) on the target project

Answer

To associate a Google Cloud project with a Cloud Billing account under least privilege, the user requires two specific predefined roles: Billing Account User (`roles/billing.user`) assigned on the Cloud Billing account, and Project Billing Manager (`roles/resourcemanager.projectBillingManager`) assigned on the target project.
Linking a project to a Cloud Billing account requires permissions on both target entities. On the billing account level, Billing Account User (`roles/billing.user`) authorizes spending and linking. On the project level, Project Billing Manager (`roles/resourcemanager.projectBillingManager`) authorizes attaching the billing account. Together, these two predefined roles provide the exact set of minimum permissions needed.

Step-by-Step Solution

1
Identify the required privileges on the Cloud Billing account resource.
Determined that the user needs authorization to associate the billing account with projects, which is fulfilled by `roles/billing.user` on the billing account.
Permissions on the billing account itself control who is authorized to spend against that billing account.
2
Identify the required privileges on the target Google Cloud project resource.
Determined that the user needs authorization to change billing properties on the project, fulfilled by `roles/resourcemanager.projectBillingManager` on the target project.
Permissions on the project resource control who is authorized to modify project-level configuration such as billing linking.
3
Evaluate candidate roles against the least-privilege mandate.
Selected predefined roles (`roles/billing.user` and `roles/resourcemanager.projectBillingManager`) instead of excessive broad roles like `roles/billing.admin`, `roles/owner`, or `roles/resourcemanager.organizationAdmin`.
Google Cloud security guidance requires applying predefined roles scoped to specific administrative tasks rather than broad primitive or administrative roles.

Key Concept

Least-privilege permission matrix for linking Google Cloud projects to Cloud Billing accounts
Estimated Time:2m 0s
Question 227Question

A system architect is planning to deploy an enterprise database workload on Google Compute Engine that requires high RAM capacity per core and must maintain 100% uptime without any sudden terminations. Which Compute Engine machine family and instance provisioning model should the cloud engineer select?

Show answer & explanation

Answer: Memory-optimized machine family provisioned as standard Virtual Machines

Answer

Memory-optimized machine family provisioned as standard Virtual Machines
Selecting a memory-optimized machine family (such as M1, M2, or M3) delivers the highest memory-to-vCPU ratio required by memory-intensive databases. Choosing standard virtual machines guarantees continuous uptime without the risk of preemption.

Step-by-Step Solution

1
Analyze the workload resource requirements
The application requires high RAM per core (memory-bound).
Memory-optimized machine types are specifically architected for memory-intensive workloads like large in-memory databases.
2
Evaluate availability and SLA requirements
The workload must run continuously without risk of preemption.
Standard VM provisioning ensures instances run continuously, whereas Spot/Preemptible VMs can be stopped at any time.

Key Concept

Selecting Compute Engine machine families and provisioning models based on workload memory and uptime requirements.
Question 228Question

You need to grant a developer access to view and download objects stored within a specific Cloud Storage bucket in your project. Following Google Cloud best practices and the principle of least privilege, which IAM role should you assign?

Show answer & explanation

Answer: Storage Object Viewer (roles/storage.objectViewer)

Answer

The correct role is Storage Object Viewer (roles/storage.objectViewer).
The Storage Object Viewer role (roles/storage.objectViewer) grants read-only access to storage objects within Cloud Storage. Predefined roles are recommended by Google Cloud because they follow the principle of least privilege by providing only the permissions necessary for the specific task.

Step-by-Step Solution

1
Identify the required operational task
The user needs to view and download objects from a Cloud Storage bucket.
Understanding the precise permissions needed is essential for adhering to least privilege access.
2
Evaluate role types following GCP best practices
Avoid primitive roles (Viewer, Editor, Owner) when specific predefined roles exist.
Primitive roles grant broad access to almost all GCP services in the project, whereas predefined roles scope permissions down to specific service tasks.
3
Select the appropriate predefined IAM role
Storage Object Viewer provides permissions to read and list bucket objects specifically.
This grants exactly the required permissions without unnecessary administrative privileges.

Key Concept

Principle of Least Privilege using Predefined IAM Roles
Estimated Time:45s
Question 229Question

An engineer is using the Google Cloud Pricing Calculator to estimate monthly infrastructure costs for a fault-tolerant batch processing workload on Compute Engine that can tolerate sudden instance interruptions. Which configuration choice in the pricing calculator provides the most cost-effective option for these compute instances?

Show answer & explanation

Answer: Provisioning the instances as Spot (Preemptible) virtual machines.

Answer

Provisioning the instances as Spot (Preemptible) virtual machines is the most cost-effective choice for fault-tolerant batch processing workloads.
Selecting Spot virtual machines is the correct choice because Spot VMs offer significant discounts off standard on-demand prices. They are specifically intended for batch processing and fault-tolerant workloads that can tolerate instance preemptions.

Step-by-Step Solution

1
Analyze the workload characteristics provided in the scenario.
The workload consists of fault-tolerant batch jobs that can handle unexpected instance shutdowns.
Identifying fault tolerance enables selecting discounted compute models in Google Cloud.
2
Evaluate pricing models available in the Google Cloud Pricing Calculator.
Spot VMs leverage excess Compute Engine capacity at discounts of 60% to 91% compared to standard on-demand pricing.
Spot instances are specifically designed for workloads that can handle preemption, providing maximum cost savings.

Key Concept

Estimating Compute Engine Spot VM costs for fault-tolerant workloads
Estimated Time:45s
Question 230Question

A cloud engineer is utilizing the Google Cloud Pricing Calculator to model monthly cost projections for a complex multi-component architecture migration. The proposed workload includes:

1. Baseline 24/7 web server instances running continuously for a planned 3-year period.
2. Primary stateful PostgreSQL database instances requiring high availability and persistent storage.
3. Stateless batch processing tasks that can be safely interrupted and rescheduled.
4. Compliance log archives stored long-term with rare but mandatory immediate-access emergency retrieval requirements.

Which of the following configuration practices in the pricing calculator will yield an accurate, cost-optimized estimate while avoiding invalid pricing assumptions or operational misconfigurations? (Select TWO choices.)

Select all that apply

Show answer & explanation

Answer: Apply 3-year Committed Use Discounts (CUDs) to the baseline vCPU and memory resource requirements for the continuous 24/7 web server instances, while selecting Spot VMs for the interruptible batch processing workload.; Factor in data retrieval fees and minimum retention duration penalties into the calculator estimate when transitioning historical compliance logs to colder storage classes.

Answer

The correct recommendations are to apply 3-year Committed Use Discounts (CUDs) to continuous 24/7 baseline compute workloads while using Spot VMs for stateless batch tasks, and to include data retrieval fees and retention penalties when modeling colder Cloud Storage class transitions.
Applying 3-year Committed Use Discounts to predictable 24/7 web server workloads while selecting Spot VMs for stateless batch tasks correctly matches workload availability profiles to optimal GCP pricing mechanisms. Furthermore, accounting for retrieval fees and minimum storage durations ensures accurate TCO modeling for archival logs moved to colder Cloud Storage tiers.

Step-by-Step Solution

1
Analyze Compute Engine workload requirements for discount model eligibility.
24/7 continuous workloads qualify for 1-year or 3-year Committed Use Discounts (CUDs). Interruptible batch jobs qualify for Spot VMs.
CUDs require steady state baseline usage. Spot VMs offer up to 60-90% savings for fault-tolerant jobs.
2
Evaluate Spot VM restrictions regarding stateful services and discount stacking.
Spot VMs cannot host stateful databases and cannot be combined with CUDs.
Spot instances can be preempted at any time and already receive maximum variable discounting.
3
Calculate Cloud Storage lifecycle transition costs for archival logs.
Coldline/Archive storage pricing must include retrieval cost estimations and early deletion/transition minimum term commitments.
Lower storage tier pricing is offset by operational charges during emergency retrieval access.

Key Concept

Accurate GCP Cost Modeling with CUDs, Spot VMs, and Storage Class Penalties
Question 231Question

A financial technology company needs to store historical customer transaction receipts in Google Cloud Storage for 5 years to meet regulatory compliance requirements. These receipts are expected to be accessed less than once per year, but when requested for an audit, they must be retrieved immediately within milliseconds. Which Cloud Storage class provides the lowest storage cost for this access pattern?

Show answer & explanation

Answer: Archive Storage

Answer

Archive Storage is the most cost-effective Google Cloud Storage class for data accessed less than once per year while providing millisecond retrieval times.
Archive Storage is optimized for long-term digital preservation and data accessed less than once per year. It provides the lowest per-gigabyte monthly storage cost among Google Cloud Storage classes while preserving instant (millisecond) access.

Step-by-Step Solution

1
Analyze the data access frequency and latency requirements.
Access frequency is less than once per year, and data must be retrievable within milliseconds.
Google Cloud Storage classes differ primarily by minimum storage duration, access frequency optimization, and per-GB storage vs. retrieval costs.
2
Evaluate Google Cloud Storage classes based on the annual access pattern.
Archive Storage is specifically designed for data accessed less than once a year (365-day minimum duration) and offers the lowest monthly storage cost among all GCS tiers without sacrificing millisecond access time.
Choosing Archive Storage minimizes total cost of ownership for long-term compliance archives.

Key Concept

Selecting Cloud Storage classes based on access frequency, retention period, and cost optimization.
Question 232Question

An Cloud Engineer needs to set up daily Cloud Billing export to BigQuery for long-term spend analysis. Sequence the following steps in the correct order to successfully configure the export.

Drag items to arrange them in the correct order

Show answer & explanation

Answer

The correct sequence begins by creating the target BigQuery dataset, verifying that necessary IAM roles (Billing Account Administrator and BigQuery Data Editor) are assigned, navigating to Billing export in the Cloud Console, and finally specifying the target project and dataset to enable the export.
To set up Cloud Billing export to BigQuery, a target BigQuery dataset must first exist in a designated project. Next, the engineer must hold appropriate permissions (Billing Account Administrator and BigQuery Data Editor). Then, the engineer navigates to the Billing export section in the GCP Console and selects BigQuery export. Finally, selecting the target project and dataset and saving the configuration enables the export stream.

Step-by-Step Solution

1
Create a BigQuery dataset
A destination location exists to receive billing data.
Cloud Billing export requires a pre-existing dataset in a project.
2
Verify IAM permissions
The engineer has authorization to link billing and BigQuery.
Creating the sink requires Billing Account Administrator on the billing account and BigQuery Data Editor on the target dataset.
3
Navigate to Billing export settings
Access to Cloud Billing configuration options.
Billing export configuration is managed in the Cloud Billing navigation pane.
4
Configure destination dataset and save settings
Cloud Billing export is activated.
Linking the target dataset completes the workflow.

Key Concept

Configuring Cloud Billing Export to BigQuery
Question 233Question

A digital media publishing company is planning the Google Cloud compute architecture for two newly developed backend workloads:

1. Video Transcoding Batch Pipeline: A fault-tolerant, stateless batch job that processes uploaded media files, checkpoints progress to Cloud Storage, and can handle unexpected server terminations without data loss.
2. User Comments API: A stateless containerized microservice that handles HTTP REST requests for article commentary, experiences unpredictable traffic spikes during peak news events, requires minimal operational management overhead, and must scale down to zero instances when idle to conserve costs.

Which TWO compute architecture strategies should you recommend to meet these functional and operational requirements while minimizing costs?

Select all that apply

Show answer & explanation

Answer: Deploy the Video Transcoding Batch Pipeline on Compute Engine Spot VMs managed by an instance group.; Deploy the User Comments API microservice onto Cloud Run.

Answer

Deploy the Video Transcoding Batch Pipeline on Compute Engine Spot VMs managed by an instance group, and deploy the User Comments API microservice onto Cloud Run.
Deploying the video transcoding workload on Compute Engine Spot VMs provides up to 91% cost savings for fault-tolerant batch workloads that store state checkpoints. Deploying the user commentary microservice on Cloud Run fulfills the requirement for containerized deployment, zero infrastructure administration, fast automatic request scaling, and scaling down to zero when idle.

Step-by-Step Solution

1
Analyze the requirements for the Video Transcoding Batch Pipeline.
The pipeline is stateless, fault-tolerant, checkpoints state to Cloud Storage, and can handle interruptions.
Fault-tolerant batch processing workloads that can resume work are prime candidates for Spot VMs, which offer significant cost savings compared to on-demand Compute Engine instances.
2
Analyze the requirements for the User Comments API.
The microservice is containerized, stateless, experiences variable HTTP traffic, requires zero infrastructure overhead, and must scale to zero.
Cloud Run natively supports containerized stateless HTTP applications, automatically scales compute instances based on incoming web requests (including scaling to zero), and eliminates server/node management.
3
Evaluate and eliminate suboptimal compute options.
Cloud Functions is suboptimal for multi-container web microservices; on-demand GKE instances incur unnecessary costs for fault-tolerant jobs; GKE Autopilot restricts custom host kernel modifications.
Choosing the correct serverless and compute abstractions aligns with cost optimization and operational simplicity principles on Google Cloud Platform.

Key Concept

Compute Resource Selection and Trade-Off Assessment (Spot VMs vs Cloud Run vs GKE)
Estimated Time:2m 30s
Question 234Question

A financial technology company is designing a container architecture on Google Cloud for two distinct services. The first service is a stateless public API frontend that requires minimal operational overhead, automated node security patching, and no infrastructure management. The second service is a fault-tolerant batch processing engine that executes asynchronous calculations, where workload interruptions are acceptable in exchange for maximum cost savings. Which TWO architectural decisions should the cloud engineering team implement to satisfy these requirements?

Select all that apply

Show answer & explanation

Answer: Deploy a GKE Autopilot cluster to host the stateless public API frontend workload.; Provision a GKE Standard node pool utilizing Spot VMs with Cluster Autoscaler enabled for the batch processing engine.

Answer

The team should deploy a GKE Autopilot cluster for the stateless API frontend and configure a GKE Standard node pool using Spot VMs with Cluster Autoscaler for the batch processing engine.
Choosing GKE Autopilot transfers all node management, OS patching, and security provisioning duties directly to Google Cloud, satisfying the requirement for zero infrastructure management overhead for the stateless API frontend. For the fault-tolerant batch processing engine, establishing a GKE Standard node pool composed of Spot VMs provides significant cost reduction for workloads that tolerate preemption, while Cluster Autoscaler ensures nodes scale dynamically based on pending pod queue requirements.

Step-by-Step Solution

1
Analyze operational requirements for the stateless API frontend
Identified the requirement for zero node management overhead and automated security patching.
GKE Autopilot manages the entire node lifecycle and infrastructure, making it the ideal choice when node management is to be eliminated.
2
Analyze cost and resiliency requirements for the batch processing engine
Identified a fault-tolerant, interruptible workload requiring maximum cost reduction.
Spot VMs offer up to 60-91% discounts over standard VMs, perfect for stateless batch jobs where node preemption is acceptable.
3
Select infrastructure auto-provisioning strategy for node capacity
Paired Spot VMs in GKE Standard with Cluster Autoscaler.
Cluster Autoscaler automatically adjusts node count based on resource demands of pending batch pods, whereas HPA only adjusts pod counts.

Key Concept

Planning Google Kubernetes Engine (GKE) Cluster Architectures: GKE Autopilot vs. Standard Operational Boundaries and Spot VM Integration
Question 235Question

An organization is planning its Google Cloud infrastructure for two distinct applications. Application 1 is a high-throughput video transcode batch processing pipeline that processes stateless chunks in parallel and can handle unexpected instance terminations without data loss. Application 2 is a core web service operating continuously 24 hours a day, 7 days a week, with predictable baseline resource requirements. Which TWO machine planning and pricing strategies should you implement to optimize overall compute costs while maintaining performance requirements?

Select all that apply

Show answer & explanation

Answer: Provision Spot Compute Engine VMs for the stateless batch processing workers in Application 1.; Purchase Committed Use Discounts (CUDs) for the steady-state Standard VMs running Application 2.

Answer

Select Spot Compute Engine VMs for the fault-tolerant batch processing workload, and apply Committed Use Discounts (CUDs) to Standard VMs for the continuous 24/7 web application.
The combination of Spot Compute Engine VMs for fault-tolerant batch processing and Committed Use Discounts (CUDs) for continuous 24/7 web services aligns directly with GCP cost-optimization best practices. Spot VMs drastically reduce compute costs for jobs that easily resume on preemption, while CUDs provide predictable price reductions for uninterrupted baseline infrastructure.

Step-by-Step Solution

1
Analyze Application 1 requirements (fault-tolerant, stateless, batch processing).
Identify that Spot VMs offer maximum cost savings for workloads capable of handling preemption.
Spot instances offer deep discounts and fit batch jobs that can restart work items if preempted.
2
Analyze Application 2 requirements (continuous 24/7 operation, predictable resource demand).
Select Standard VMs paired with 1-year or 3-year Committed Use Discounts (CUDs).
Continuous baseline capacity receives significant contractual discounts without risk of unexpected termination.
3
Evaluate anti-patterns in remaining alternatives.
Reject using Spot VMs for steady-state web applications and Cloud Functions for heavy batch media encoding.
Spot VMs violate SLA expectations for continuous web servers, while Cloud Functions cannot handle resource-intensive long-running video processing.

Key Concept

Selecting appropriate Compute Engine purchasing models (Spot VMs vs. Committed Use Discounts) based on workload fault-tolerance and baseline usage predictability.
Question 236Question

A fintech enterprise is designing a storage architecture on Google Cloud for financial audit logs. The access pattern and compliance requirements are defined as follows:

• Log objects are continuously uploaded and accessed heavily by real-time fraud detection systems during their first 30 days.
• After 30 days, access drops to near-zero, but data must be retained for 7 years (2,5552,555 days) to comply with legal regulations.
• In the rare event of a regulatory audit, objects must remain retrievable in milliseconds without multi-hour vault restoration delays.
• The architecture must guarantee immutability against deletion or modification during the compliance window while minimizing total cost of ownership (storage, retrieval fees, and early transition penalties).

Which TWO configuration decisions should the cloud engineer implement to satisfy these requirements?

Select all that apply

Show answer & explanation

Answer: Set the bucket default storage class to Standard, and apply an Object Lifecycle Management rule to transition objects to Archive storage when their age reaches 30 days.; Configure a Retention Policy with a duration of 7 years (2,555 days) on the bucket and lock it using Bucket Lock.

Answer

The optimal strategy requires ingesting data into Standard storage and transitioning to Archive storage after 30 days via Object Lifecycle Management, paired with a locked Bucket Lock retention policy set to 7 years.
Ingesting data into Standard storage avoids high retrieval fees during the active 30-day querying phase. Transitioning directly to Archive storage at day 30 minimizes monthly storage fees for the remaining 7 years without early transition penalties. GCP Archive storage retains millisecond retrieval latency when regulatory audits occur. Furthermore, locking a 7-year Retention Policy using Bucket Lock ensures irreversible compliance with regulatory immutability requirements.

Step-by-Step Solution

1
Analyze access frequency and retrieval costs during the active period (Days 1–30).
Real-time query workloads generate frequent read requests. Using Standard storage incurs zero retrieval fees per gigabyte processed.
Coldline and Archive classes charge substantial retrieval fees per GB, making them cost-prohibitive during active processing.
2
Evaluate long-term retention and minimum duration constraints.
Transitioning directly from Standard to Archive at day 30 incurs no minimum duration penalty because Standard storage has no minimum retention requirement. Archive storage provides the lowest rate for the remaining 7 years while offering millisecond latency upon retrieval.
Staging through Nearline (30-day minimum) or Coldline (90-day minimum) within short windows creates prorated early transition penalty charges.
3
Select compliance and immutability controls.
Configuring a bucket Retention Policy locked via Bucket Lock enforces regulatory WORM (Write Once, Read Many) compliance.
Standard IAM permissions or lifecycle rules alone do not prevent accidental deletion by privileged administrative accounts.

Key Concept

Cloud Storage Class Selection, Lifecycle Minimum Duration Penalties, and Bucket Lock Planning
Estimated Time:3m 0s
Question 237Question

A financial analytics team is deploying batch processing workloads to a project named `hpc-simulations-prod`. The Compute Engine API is already enabled for the project, but automated deployment scripts fail when attempting to provision additional virtual machines, returning an error stating that regional vCPU limits have been exceeded. Which action should the cloud administrator take to resolve this issue?

Show answer & explanation

Answer: Submit a formal quota increase request for regional vCPUs through the Cloud Console Quotas page.

Answer

Submit a formal quota increase request for regional vCPUs through the Cloud Console Quotas page.
When a Google Cloud service API is already enabled but resource creation fails due to quota boundaries (such as regional vCPU limits), the administrator must request a quota increase through the Cloud Console or gcloud service-usage quota commands. Quotas protect against unexpected consumption and are managed separately from API enablement status.

Step-by-Step Solution

1
Identify the root cause of the deployment failure
Recognize that the API is enabled, but the project has reached its maximum allocated quota for regional vCPUs.
API enablement allows usage of a service, but resource usage remains subject to project quota limits.
2
Select the correct Google Cloud quota management workflow
Navigate to IAM & Admin > Quotas (or Service Usage Quotas) and request an increased limit for the specific region.
Quota increases must be reviewed and approved by Google Cloud or granted automatically based on billing history.

Key Concept

Managing Cloud Service Resource Quotas and API Allocation
Estimated Time:1m 30s
Question 238Question

An organization is establishing access controls for an automated infrastructure deployment pipeline and a finance audit team. A service account named `[email protected]` requires permissions to fully manage Compute Engine virtual machine instances only within the target project `prod-core`. Simultaneously, a compliance auditor needs read-only access to inspect spending trends and invoice data on the Billing Account associated with `prod-core`, without permission to modify billing configurations or manage project resources. Which IAM role configurations adhere to Google Cloud best practices and the principle of least privilege? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Grant `roles/compute.instanceAdmin.v1` to `[email protected]` on the `prod-core` project resource.; Grant `roles/billing.viewer` to the compliance auditor user directly on the Billing Account resource.

Answer

Grant `roles/compute.instanceAdmin.v1` to the service account on the target project resource, and grant `roles/billing.viewer` to the compliance auditor directly on the Billing Account resource.
The correct options implement least-privilege security principles by granting targeted predefined roles at the appropriate levels of the GCP resource hierarchy. Assigning Compute Instance Admin (v1) at the project level gives the service account necessary permissions for instance management without project-wide Editor rights. Assigning Billing Account Viewer directly on the Billing Account resource provides the auditor with read-only cost visibility without administrative mutation permissions.

Step-by-Step Solution

1
Evaluate service account requirements for compute instance management
Select `roles/compute.instanceAdmin.v1` applied at the project scope.
Google Cloud best practice requires using predefined roles targeted to specific services over primitive roles like Editor.
2
Evaluate auditor requirements for billing inspection
Select `roles/billing.viewer` applied directly on the Billing Account resource.
Billing access must be scoped to the Billing Account object, and viewing billing metrics requires only read-only Viewer permissions rather than Admin rights.

Key Concept

Applying least-privilege predefined roles at correct resource hierarchy nodes (Project vs Billing Account).
Question 239Question

A FinOps engineer is designing a centralized cost governance architecture for an enterprise Google Cloud environment. The organization requires two capabilities: first, streaming daily granular cost logs into BigQuery for custom SQL analytics; second, triggering an automated Cloud Run microservice to modify resource deployment parameters whenever project expenditure exceeds 80% of the monthly budget allocation. Which set of IAM permissions and service integration configurations strictly aligns with Google Cloud recommended practices to accomplish this?

Show answer & explanation

Answer: Grant the engineer the Billing Account Administrator role on the billing account and the BigQuery Data Editor role on the target dataset; configure a Cloud Billing budget threshold notification publishing to a Cloud Pub/Sub topic that invokes the Cloud Run service.

Answer

Grant the engineer the Billing Account Administrator role on the billing account and the BigQuery Data Editor role on the target dataset; configure a Cloud Billing budget threshold notification publishing to a Cloud Pub/Sub topic that invokes the Cloud Run service.
The correct response accurately identifies both authorization and architectural requirements. Configuring a BigQuery billing export requires the user to hold the Billing Account Administrator role on the Cloud Billing account and the BigQuery Data Editor role on the target dataset. Furthermore, because GCP budgets do not automatically shut down resources, publishing threshold events to a Cloud Pub/Sub topic is the standard GCP pattern for triggering downstream automation services like Cloud Run.

Step-by-Step Solution

1
Evaluate IAM permission requirements for Cloud Billing BigQuery Export.
Configuring export requires Billing Account Administrator on the Cloud Billing Account and BigQuery Data Editor (or BigQuery Admin) on the destination BigQuery dataset.
Permissions are required on both sides of the integration: permission to configure billing export settings on the billing account and permission to create/write table data in the BigQuery dataset.
2
Analyze budget threshold notification capabilities.
GCP billing budgets send notification emails and publish JSON messages to Cloud Pub/Sub topics upon hitting configured percentages or amounts.
Budgets do not directly execute resource shutdowns or invoke HTTP webhooks directly without an intermediate message queue.
3
Determine the mechanism for automated programmatic actions.
Connect the budget's Pub/Sub topic to trigger a Cloud Run service (or Cloud Function) that parses the budget payload and executes governance actions via GCP APIs.
Pub/Sub acts as the event broker between Cloud Billing alerting events and serverless compute execution.

Key Concept

Cloud Billing Budgets, Pub/Sub Integration, and BigQuery Billing Export IAM
Question 240Question

An enterprise cloud operations team manages a Google Cloud resource hierarchy containing an Organization node, top-level environment Folders, and team-specific sub-folders. A security engineer needs to grant a lead analyst the ability to manage compute resources across all current and future projects located inside the 'Analytics-Dev' sub-folder, while following Google-recommended security practices and avoiding unnecessary operational maintenance. What should the security engineer do?

Show answer & explanation

Answer: Grant the predefined Compute Admin role to the lead analyst at the 'Analytics-Dev' sub-folder level.

Answer

Grant the predefined Compute Admin role to the lead analyst at the 'Analytics-Dev' sub-folder level.
Granting the predefined Compute Admin role at the folder level leverages Google Cloud's IAM resource hierarchy policy inheritance. Permissions applied at a parent folder automatically flow down to all current and future child projects residing within that folder. Furthermore, using a predefined role ensures compliance with the principle of least privilege compared to broad primitive roles.

Step-by-Step Solution

1
Analyze the scope requirement
Access must apply to all existing and future projects within the 'Analytics-Dev' sub-folder.
Permissions granted at parent nodes in the GCP resource hierarchy (Organization > Folder > Project > Resource) are transitively inherited by all child resources.
2
Select the appropriate IAM role type
Choose the predefined Compute Admin role over broad primitive roles like Editor or Owner.
Predefined roles adhere to the principle of least privilege by scoping permissions specifically to Compute Engine resources.
3
Identify the target resource binding location
Bind the role at the 'Analytics-Dev' sub-folder resource level.
Binding at the folder level ensures automatic policy inheritance for both existing and newly created projects under that folder without ongoing manual maintenance.

Key Concept

Resource Hierarchy IAM Inheritance & Predefined Roles
PreviousPage 12 / 80Next
All practice questions — Google Cloud Associate Cloud Engineer | Examkin