Courseiva
Google Cloud Products and ServicesmediumMultiple ChoiceObjective-mapped

Cloud Digital Leader Google Cloud Products and Services Practice Question

A developer needs to trigger a serverless function whenever a new file is uploaded to a Cloud Storage bucket. The function will process the file and store results in Firestore. Which Google Cloud service should they use for the function?

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.

Answer analysis

Option-by-option breakdown

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

  • App Engine

    Why it's wrong here

    App Engine is a fully managed platform for building web applications and APIs, not a lightweight event-driven function service. It requires deploying a complete application runtime (e.g., a web framework) and is designed for sustained HTTP traffic, not for triggering code directly on low-level GCP resource events such as a Cloud Storage object finalize. While App Engine can handle background work via task queues or cron, it lacks the native, fine-grained event source integration that Cloud Functions provides for storage events, making it unnecessarily complex and not the correct serverless trigger mechanism for this use case.

  • Compute Engine

    Why it's wrong here

    Compute Engine provides virtual machines that require ongoing management, operating system maintenance, and manual scaling, none of which align with the serverless trigger requirement for Cloud Storage uploads. It is tempting because it can run arbitrary code and process files, but it lacks the native event-driven integration that Cloud Functions offers. Compute Engine would be correct for a long-running application needing full control over the runtime environment.

  • Cloud Run

    Why it's wrong here

    Cloud Run is incorrect because it is primarily designed for stateless containers invoked by HTTP requests or Pub/Sub messages, not directly by Cloud Storage object finalisation events. While a Pub/Sub notification could bridge this, Cloud Functions offers native integration for such event-driven triggers. Cloud Run is tempting as a flexible serverless container platform, ideal for web services, APIs, or background jobs requiring custom runtimes and longer execution times, where an HTTP endpoint or Pub/Sub subscription is the primary invocation method.

  • Cloud Functions

    Why this is correct

    Cloud Functions is a purpose-built, event-driven serverless compute platform that natively responds to GCP events, including Cloud Storage object finalization (e.g., the 'google.storage.object.finalize' trigger). When an object is uploaded, Cloud Functions automatically invokes the function with the event metadata, scaling to zero when idle and managing all infrastructure transparently. This aligns exactly with the requirement to trigger a single-purpose serverless function on a storage event, without needing a container runtime, a web server, or an intermediary like Pub/Sub.

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.