Courseiva
Google Cloud Products and ServicesmediumMultiple ChoiceObjective-mapped

Cloud Digital Leader Google Cloud Products and Services Practice Question

A developer wants to trigger a serverless function whenever a new object is uploaded to a Cloud Storage bucket. Which Google Cloud service should they use?

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

Cloud Functions is an event-driven serverless compute service that can be triggered by Cloud Storage events such as object finalise/create. Cloud Run can also be triggered by events via Eventarc, but Cloud Functions is the simpler choice for small code snippets triggered by events. Dataflow and App Engine are not designed for event-triggered functions from Cloud Storage.

Answer analysis

Option-by-option breakdown

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

  • Cloud Functions

    Why this is correct

    Cloud Functions is the correct choice because it is Google Cloud's event-driven serverless compute service designed to respond directly to Cloud Storage events. Specifically, Cloud Functions natively subscribes to the `google.storage.object.finalize` event, which is emitted whenever an object is uploaded or overwritten in a bucket. This background function type requires no custom intermediary, as the event is delivered automatically and the function can immediately process the object, making it the most direct and efficient mechanism for triggering on object uploads.

  • Cloud Run

    Why it's wrong here

    Cloud Run deploys containerised applications that respond to HTTP requests, but it lacks native event-arc triggers for Cloud Storage object finalisation events; the correct service, Cloud Functions, directly subscribes to bucket notifications via Pub/Sub. It is tempting because Cloud Run can handle HTTP-triggered workloads and might be chosen for containerised code, but it would require a custom intermediary like Eventarc to receive storage events, adding unnecessary complexity.

  • App Engine

    Why it's wrong here

    App Engine is a Platform-as-a-Service (PaaS) solution built for hosting web applications and services that respond to HTTP requests. While App Engine can scale automatically and be written in various languages, it does not have a native Cloud Storage event trigger; it cannot subscribe directly to `google.storage.object.finalize` events. To act on object uploads, an App Engine app would need to receive an HTTP notification routed through a separate service like Pub/Sub or a third-party webhook, adding extra moving parts and latency. This indirect approach is neither natural nor recommended compared to Cloud Functions' built-in event integration.

  • Dataflow

    Why it's wrong here

    Dataflow is a managed service for executing Apache Beam pipelines, primarily intended for batch and stream data processing at scale. It does not serve as an event trigger mechanism for Cloud Storage; rather, it is the downstream processing engine that would consume data after some trigger initiates a job. To react to an object finalization event, you would still need something like Cloud Functions or Pub/Sub to invoke the Dataflow job, since Dataflow itself has no native subscription to `google.storage.object.finalize`. This makes Dataflow an unnecessary and incorrect layer for the simple act of triggering on an upload, as it is designed to process data, not to originate event-driven responses.

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.