Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 353 of 481

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

Google Professional Cloud Developer Question 353

Single answerGoogle Cloud Platform

You are developing a serverless application and need to configure an event-driven architecture. Your application must trigger a Cloud Run service whenever a file is uploaded to a specific Cloud Storage bucket. Which approach should you take to meet this requirement?

  1. A

    Create a Pub/Sub topic, configure Cloud Storage to publish upload events to the topic, and configure Cloud Run to subscribe to the topic.

  2. B

    Use Eventarc to directly route Cloud Storage upload events to the Cloud Run service.

  3. C

    Configure a Cloud Function to listen to Cloud Storage upload events and invoke the Cloud Run service.

  4. D

    Set up a cron job in Cloud Scheduler to periodically check the Cloud Storage bucket and invoke the Cloud Run service.

Show answer and explanation

Correct answer: B

Explanation

Eventarc is the recommended solution for configuring event receivers in an event-driven architecture. It provides native integration with Cloud Storage and can directly route events to Cloud Run services without needing additional intermediaries. This reduces complexity and ensures efficient, real-time event handling.

  • A. Incorrect.

    While Pub/Sub can be used for event-driven architectures, this approach requires additional configuration and is not the most direct solution when Eventarc supports Cloud Storage events natively.

  • B. Correct.

    Eventarc supports direct integration with Cloud Storage for specific events, such as file uploads. It can natively trigger Cloud Run services, making it the most efficient and recommended solution.

  • C. Incorrect.

    Using a Cloud Function to listen to Cloud Storage events and invoke Cloud Run adds unnecessary complexity and is not recommended when Eventarc natively supports the use case.

  • D. Incorrect.

    Using a cron job to periodically check the bucket for changes is inefficient and not event-driven, which does not align with the requirements of the problem.

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