Courseiva
Google Cloud products, services, and solutionseasyMultiple ChoiceObjective-mapped

Cloud Digital Leader Practice Question: Google Cloud products, services, and solutions

A developer wants to run a small piece of code that resizes images whenever a new image is uploaded to Cloud Storage. The code runs for less than a second and should only be triggered by the upload event. No always-on server is needed. Which Google Cloud service is ideal?

⚠ Common exam trap

Google Cloud often tests the distinction between event-driven serverless (Cloud Functions) and container-based serverless (Cloud Run), where candidates mistakenly choose Cloud Run because it 'can run code' without realizing it requires an HTTP endpoint and cannot be directly triggered by Cloud Storage events without an intermediary like Eventarc.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Cloud Functions triggered by Cloud Storage object creation events.

Cloud Functions is the ideal serverless compute service for event-driven, short-lived tasks like image resizing triggered by Cloud Storage uploads. It automatically scales to zero when idle, charges only for execution time (sub-second in this case), and natively binds to Cloud Storage object creation events via the `google.storage.object.finalize` trigger, eliminating the need for any always-on infrastructure.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • A Compute Engine VM that runs continuously, checking for new uploads every minute.

    Why it's wrong here

    A Compute Engine VM that runs continuously, polling Cloud Storage every minute represents an always-on architecture. It incurs hourly compute costs and requires ongoing maintenance (OS patching, monitoring), even when no uploads occur. Additionally, polling introduces up to 60 seconds of latency and does not scale elastically; the VM may be over-provisioned or under-provisioned for varying upload rates. This contradicts the serverless, event-driven model required.

  • Cloud Functions triggered by Cloud Storage object creation events.

    Why this is correct

    Cloud Functions triggered by Cloud Storage object creation events are the correct solution because they implement an event-driven, serverless architecture. Each upload to the bucket emits a notification that automatically invokes the function, which resizes the image and returns—no server runs between events. Costs are incurred only for the actual compute time during execution, and the function scales instantly with every individual upload, providing synchronous, low-latency processing.

  • Cloud Run with a permanent container that listens for uploads.

    Why it's wrong here

    A permanent Cloud Run container contradicts the requirement for no always-on server, implying continuous resource consumption unnecessary for a short-lived, event-driven task. The scenario demands a service that scales to zero and only activates upon the specific upload event. Cloud Run is ideal for containerised web services or APIs that need to be continuously available for incoming requests, scaling down to zero instances when idle, but not for a perpetually running listener as described.

  • BigQuery scheduled query that processes new uploads daily.

    Why it's wrong here

    A BigQuery scheduled query processes data only at fixed intervals, which cannot react to uploads immediately—introducing up to 24 hours of delay. More fundamentally, BigQuery is a data warehouse for running SQL analytics on tabular data; it is not designed to execute arbitrary code such as image resizing. The service would require cumbersome workarounds (e.g., using UDFs or external scripts) and still lacks the event-driven trigger that the scenario demands. Thus it is both the wrong tool and the wrong execution model.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

One of 829 original GCDL practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.