GCP Associate Cloud Engineer Practice Question 27: Eventarc Storage Trigger
Google Cloud Associate Cloud Engineer · Test 3 · question 7 of 10
Whenever a file is uploaded to a Cloud Storage bucket, a small piece of code must run to generate a thumbnail. Uploads are rare and irregular, and the team does not want to poll the bucket or keep servers running.
What is the most appropriate solution?
Show answer and explanation
Answer:
Cloud Run functions are triggered by events. An Eventarc trigger for google.cloud.storage.object.v1.finalized invokes the function each time an object is created or overwritten, so the code runs only when needed, there are no servers to manage, and you pay for the invocations.
Options A, B, and C all rely on polling, which wastes resources when uploads are rare and introduces delays. Options B and C also keep compute running continuously and require you to track which files were already processed.
Reference: Eventarc overview