nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #280

You are developing a new application. You want the application to be triggered only when a given file is updated in your Cloud Storage bucket. Your trigger might change, so your process must support d

The correct answer is C. Configure a Cloud Function that executes your application and is triggered when an object is. Cloud Functions with a Cloud Storage trigger is the simplest managed solution: the trigger is declared directly in the function's configuration, the runtime is fully managed by Google, and team members only need to update a single configuration setting to change the trigger. Opti

Integrating Google Cloud services

Question

You are developing a new application. You want the application to be triggered only when a given file is updated in your Cloud Storage bucket. Your trigger might change, so your process must support different types of triggers. You want the configuration to be simple so that multiple team members can update the triggers in the future. What should you do?

Options

  • AConfigure Cloud Storage events to be sent to Pub/Sub, and use Pub/Sub events to trigger a
  • BCreate an Eventarc trigger that monitors your Cloud Storage bucket for a specific filename, and
  • CConfigure a Cloud Function that executes your application and is triggered when an object is
  • DConfigure a Firebase function that executes your application and is triggered when an object is

How the community answered

(17 responses)
  • A
    6% (1)
  • B
    12% (2)
  • C
    71% (12)
  • D
    12% (2)

Explanation

Cloud Functions with a Cloud Storage trigger is the simplest managed solution: the trigger is declared directly in the function's configuration, the runtime is fully managed by Google, and team members only need to update a single configuration setting to change the trigger. Option A (Cloud Storage → Pub/Sub → trigger) adds unnecessary indirection and complexity for a simple file-update trigger. Option B (Eventarc) is more powerful and flexible across many event sources, but its configuration is more complex than a direct Cloud Functions trigger, conflicting with the 'simple configuration' requirement. Option D (Firebase Functions) is designed for Firebase-centric workloads and adds an extra platform dependency without any benefit over native Cloud Functions for this use case.

Topics

#Cloud Functions#Cloud Storage Triggers#Event-Driven Architecture#Serverless

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice