Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 349 of 481

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

Google Professional Cloud Developer Question 349

Select 3Google Cloud Platform

You are developing a cloud-native application that processes file uploads to a Cloud Storage bucket. When a file is uploaded, the application should trigger a Cloud Run service for further processing. Which steps should you take to configure the event receiver correctly?

  1. A

    Create an Eventarc trigger with the Cloud Storage bucket as the source and the Cloud Run service as the destination.

  2. B

    Grant the 'roles/eventarc.eventReceiver' role to the Cloud Run service's service account.

  3. C

    Enable the Eventarc, Cloud Run, and Cloud Storage APIs in your project.

  4. D

    Set up a Pub/Sub topic and manually configure Cloud Run to subscribe to it.

  5. E

    Add a filter to the Eventarc trigger to specify the storage event type, such as 'google.cloud.storage.object.v1.finalized'.

Show answer and explanation

Correct answers: A, C, E

Explanation

To configure an event receiver for processing file uploads to a Cloud Storage bucket with Cloud Run, you should use Eventarc to create a trigger that connects the bucket to the Cloud Run service. This approach eliminates the need for manual Pub/Sub subscriptions and simplifies the event-driven architecture. Additionally, enabling the relevant APIs is required for the services to function. Adding a filter to the Eventarc trigger ensures that only specific events (such as file finalization) are processed.

  • A. Correct.

    Correct: Creating an Eventarc trigger is the recommended way to connect a Cloud Storage bucket to a Cloud Run service for event-driven architectures.

  • B. Incorrect.

    Incorrect: The 'roles/eventarc.eventReceiver' role is not required for the Cloud Run service's service account in this scenario. Eventarc handles the event delivery.

  • C. Correct.

    Correct: Enabling the necessary APIs (Eventarc, Cloud Run, and Cloud Storage) is required for the services to interact correctly.

  • D. Incorrect.

    Incorrect: Manually setting up a Pub/Sub topic and configuring Cloud Run to subscribe is not necessary when using Eventarc, as it simplifies event delivery.

  • E. Correct.

    Correct: Adding a filter specifying the event type ensures that only the desired events (e.g., file finalization) trigger the Cloud Run service.

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