Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 352 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 352

Single answerGoogle Cloud Platform

You are developing a serverless application that processes images uploaded to a Cloud Storage bucket. You want to trigger an event-driven function to process the image whenever a new file is uploaded to the bucket. Which solution should you use to configure the event receiver?

  1. A

    Use Eventarc to create a trigger for the Cloud Storage bucket and route events to the Cloud Function.

  2. B

    Use Cloud Scheduler to periodically check for new files in the Cloud Storage bucket and invoke the Cloud Function.

  3. C

    Use Pub/Sub to directly subscribe to Cloud Storage events and forward the events to the Cloud Function.

  4. D

    Manually poll the Cloud Storage bucket for changes using a custom script and invoke the Cloud Function.

Show answer and explanation

Correct answer: A

Explanation

The best solution to trigger an event-driven function for processing new files uploaded to a Cloud Storage bucket is to use Eventarc. Eventarc is designed to listen to events from various Google Cloud services, including Cloud Storage, and route them to predefined destinations such as Cloud Functions. This eliminates the need for manual polling or scheduled tasks, ensuring efficient and real-time processing of events.

  • A. Correct.

    This is the correct answer. Eventarc can be configured to listen to events from Cloud Storage and route them to a Cloud Function, making it an ideal solution for event-driven architectures.

  • B. Incorrect.

    This is incorrect. Cloud Scheduler is designed for scheduled tasks, not for real-time event-driven processing of new files.

  • C. Incorrect.

    This is incorrect. Pub/Sub cannot directly subscribe to Cloud Storage events. Eventarc or Cloud Functions must be used to connect Cloud Storage events to Pub/Sub.

  • D. Incorrect.

    This is incorrect. Manually polling a Cloud Storage bucket for changes is inefficient and does not utilize event-driven architecture.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam