Deploy code that must run whenever a new object is uploaded to a Cloud Storage bucket. Which deployment method should you use?
Choose an answer
Tap an option to check your answer.
Correct answer: Deploy a Cloud Function and configure the Cloud Storage bucket as the trigger resource..
Why this is the answer
Deploying a Cloud Function triggered by a Cloud Storage bucket is the most direct and efficient solution. Cloud Functions are serverless, event-driven compute services that automatically execute code in response to events, such as new object uploads to a Cloud Storage bucket. This eliminates the need for managing servers and scales automatically. Using App Engine with Cloud Scheduler and Pub/Sub would be overly complex and less reactive, as Cloud Scheduler is for time-based events, not immediate object uploads. GKE with a CronJob is also for scheduled tasks and introduces significant operational overhead for a simple event-driven workload. Dataflow is designed for large-scale data processing pipelines, not for real-time, event-driven execution of code on individual object uploads.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed