Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 428 of 481

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

Google Professional Cloud Developer Question 428

Single answerGoogle Cloud Platform

You are developing a serverless application using Cloud Functions and need to integrate it with Cloud Pub/Sub for asynchronous messaging. After setting up your Cloud Pub/Sub topic and creating your Cloud Function, you notice that the function fails to trigger from the topic. Which step is most likely missing?

  1. A

    Enabling the Cloud Functions and Cloud Pub/Sub APIs in your Google Cloud project

  2. B

    Creating a Cloud Scheduler job to trigger the Cloud Function

  3. C

    Granting the Cloud Pub/Sub Publisher role to the Cloud Function service account

  4. D

    Configuring the Cloud Function trigger to listen for changes in a Cloud Storage bucket

Show answer and explanation

Correct answer: A

Explanation

When using Google Cloud services like Cloud Functions and Cloud Pub/Sub, you must ensure that the required APIs are enabled in your project. Without enabling the APIs, your resources won't interoperate correctly, and triggers or integrations will fail to work as expected. This is a common step that new developers might miss.

  • A. Correct.

    Correct. Cloud Functions and Cloud Pub/Sub APIs must be enabled in your Google Cloud project for these services to work together. Without enabling these APIs, the integration will not function.

  • B. Incorrect.

    Incorrect. Cloud Scheduler is not required to trigger a Cloud Function from a Cloud Pub/Sub topic. This is unrelated to the issue described.

  • C. Incorrect.

    Incorrect. While permissions are important, the Cloud Function service account does not need the Cloud Pub/Sub Publisher role for the integration to work. It needs Pub/Sub Subscriber permissions instead, which is not the issue described in this scenario.

  • D. Incorrect.

    Incorrect. Configuring a Cloud Function trigger to listen to Cloud Storage bucket changes is unrelated to the described scenario. This does not resolve the problem with Cloud Pub/Sub integration.

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