Easy1 markMultiple Choice
Domain 3.3: Deploying and implementing Cloud Run and Cloud FunctionsCloud FunctionsCloud StorageEvent Triggers
GCP ACE · Question 25 · Domain 3.3: Deploying and implementing Cloud Run and Cloud Functions
You are writing a Cloud Function in Node.js that needs to execute every time a new file is uploaded to a specific Cloud Storage bucket.
How should you configure the trigger for this Cloud Function?
You are writing a Cloud Function in Node.js that needs to execute every time a new file is uploaded to a specific Cloud Storage bucket.
How should you configure the trigger for this Cloud Function?
Answer options:
A.
Configure an HTTP trigger and configure Cloud Storage to send a webhook.
B.
Configure a Cloud Storage trigger using the 'google.storage.object.finalize' event.
C.
Configure a Pub/Sub trigger and poll the bucket every minute.
D.
Configure a Cloud Storage trigger using the 'google.storage.object.create' event.
How to approach this question
Know the specific event names used by Cloud Storage to trigger Cloud Functions.
Full Answer
B.Configure a Cloud Storage trigger using the 'google.storage.object.finalize' event.✓ Correct
Configure a Cloud Storage trigger using the 'google.storage.object.finalize' event.
Cloud Functions can be natively triggered by Cloud Storage events. The specific event type that fires when a file is newly uploaded or overwritten is `google.storage.object.finalize`.
Common mistakes
Choosing 'create' instead of 'finalize', as 'finalize' is the specific GCP terminology.
Practice the full GCP Associate Cloud Engineer Practice Exam 2
50 questions · hints · full answers · grading
More questions from this exam
Q01Your company is migrating to Google Cloud and needs to establish a resource hierarchy. You have t...EasyQ02You are managing access to a GCP project. You need to grant 15 developers the ability to view Com...MediumQ03You have created a new GCP project using the Cloud Console. You want to deploy a Cloud Function u...EasyQ04Your startup has a strict monthly cloud budget of $500. You want to be notified immediately if yo...EasyQ05Your finance team wants to perform complex SQL analysis on your GCP billing data to understand co...Medium
Expert