Courseiva
mediumMultiple ChoiceObjective-mapped

Google ACE Practice Question: A Cloud Function must execute automatically every…

A Cloud Function must execute automatically every time a new object is written to a specific Cloud Storage bucket. Which trigger type should be configured for the function?

⚠ Common exam trap

Google Cloud often tests the misconception that Pub/Sub is required for Cloud Storage events, but Cloud Functions directly supports Cloud Storage triggers without needing an explicit Pub/Sub topic, making Option B a common distractor.

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 Storage trigger (object finalized event)

The Cloud Storage trigger (object finalized event) is the correct choice because Cloud Functions natively supports Cloud Storage events via the `google.storage.object.finalize` event type, which fires when a new object is created or an existing object is overwritten in a bucket. This trigger automatically invokes the function without requiring any intermediary service, directly binding the function to the bucket's notification system.

Answer analysis

Option-by-option breakdown

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

  • HTTP trigger

    Why it's wrong here

    An HTTP trigger exposes a public HTTPS endpoint and fires the function only when a client sends an HTTP request to that URL. Cloud Storage does not automatically issue HTTP requests to arbitrary function URLs when a new object is created; such a configuration would require custom middleware or a separate webhook mechanism. Without an explicit caller making a request, the function remains dormant, so it cannot respond to storage uploads directly.

  • Pub/Sub trigger

    Why it's wrong here

    A Pub/Sub trigger subscribes the function to messages published on a designated topic. While Cloud Storage can send object-change notifications to Pub/Sub, that requires separately configuring storage notification filters to publish to the topic. The function would then receive the message only indirectly via Pub/Sub, adding an extra component, whereas the Cloud Storage trigger is a single-step direct binding to the storage event itself.

  • Cloud Storage trigger (object finalized event)

    Why this is correct

    A Cloud Storage trigger directly registers the function on the `google.cloud.storage.object.v1.finalized` event via Eventarc. When an object is uploaded or overwritten, Cloud Storage emits this event and routes it to the function automatically, with no intermediate service required. The function receives the object's metadata (e.g., bucket, name, size) in its payload, allowing immediate event-driven processing.

  • Cloud Scheduler trigger

    Why it's wrong here

    Cloud Scheduler is a fully managed cron service that executes jobs on a defined time schedule (e.g., every hour). It does not observe or react to storage events; it can only invoke an HTTP or Pub/Sub target at fixed intervals. Using it for uploads would require polling for new objects, adding latency and running even when no object has changed, making it inefficient and not event-driven.

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 769 original ACE 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 ACE 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 ACE exam.