
Answer-first summary for fast verification
Answer: Use Cloud Functions and configure the bucket as a trigger resource.
The correct answer is B: Use Cloud Functions and configure the bucket as a trigger resource. Cloud Functions can respond to events in Google Cloud Storage, such as object creation, deletion, and updates. This is why using Cloud Functions and configuring the bucket as a trigger resource is the appropriate solution for executing the code snippet when files are uploaded to the Cloud Storage bucket.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To achieve the goal of deploying a code snippet that automatically triggers upon the upload of a new file to a Cloud Storage bucket, you need to follow the appropriate steps. What actions should you take to properly deploy this code snippet so that it functions correctly in response to file uploads?
A
Use App Engine and configure Cloud Scheduler to trigger the application using Pub/Sub.
B
Use Cloud Functions and configure the bucket as a trigger resource.
C
Use Google Kubernetes Engine and configure a CronJob to trigger the application using Pub/Sub.
D
Use Dataflow as a batch job, and configure the bucket as a data source.
No comments yet.