Bird
0
0

How can you chain multiple event triggered Cloud Functions so that a Pub/Sub message triggers a function, which then triggers another function on a Cloud Storage event?

hard📝 Application Q9 of 15
GCP - Cloud Functions
How can you chain multiple event triggered Cloud Functions so that a Pub/Sub message triggers a function, which then triggers another function on a Cloud Storage event?
ABoth functions trigger on the same Pub/Sub topic
BFirst function publishes to Cloud Storage bucket; second function triggers on bucket event
CFirst function triggers on HTTP; second triggers on Pub/Sub
DUse a single function to handle both Pub/Sub and Storage events
Step-by-Step Solution
Solution:
  1. Step 1: Understand chaining via events

    First function triggered by Pub/Sub can write to Cloud Storage, creating an event.
  2. Step 2: Second function triggers on Cloud Storage event

    Second function listens to bucket events, triggered by first function's action.
  3. Final Answer:

    First function publishes to Cloud Storage bucket; second function triggers on bucket event -> Option B
  4. Quick Check:

    Chain via event outputs and triggers [OK]
Quick Trick: Chain functions by output event triggering next function [OK]
Common Mistakes:
  • Triggering second function on wrong event
  • Trying to trigger multiple events in one function
  • Using same trigger for both functions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes