nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #22

Your company has created an application that uploads a report to a Cloud Storage bucket. When the report is uploaded to the bucket, you want to publish a message to a Cloud Pub/Sub topic. You want to

The correct answer is A. Configure the Cloud Storage bucket to trigger Cloud Pub/Sub notifications when objects are. Cloud Storage has a built-in Pub/Sub notification feature (Object Change Notifications) that can be configured with a single gsutil notification create command or via the Console - no custom code required. When an object is created in the bucket, Cloud Storage automatically publi

Integrating GCP services

Question

Your company has created an application that uploads a report to a Cloud Storage bucket. When the report is uploaded to the bucket, you want to publish a message to a Cloud Pub/Sub topic. You want to implement a solution that will take a small amount to effort to implement. What should you do?

Options

  • AConfigure the Cloud Storage bucket to trigger Cloud Pub/Sub notifications when objects are
  • BCreate an App Engine application to receive the file; when it is received, publish a message to the
  • CCreate a Cloud Function that is triggered by the Cloud Storage bucket.
  • DCreate an application deployed in a Google Kubernetes Engine cluster to receive the file; when it

How the community answered

(30 responses)
  • A
    70% (21)
  • B
    7% (2)
  • C
    20% (6)
  • D
    3% (1)

Explanation

Cloud Storage has a built-in Pub/Sub notification feature (Object Change Notifications) that can be configured with a single gsutil notification create command or via the Console - no custom code required. When an object is created in the bucket, Cloud Storage automatically publishes a message to the specified Pub/Sub topic. This is the minimal-effort solution. Option C (Cloud Functions triggered by Cloud Storage) also works but requires writing and deploying function code. Options B and D (App Engine and GKE) require building, deploying, and maintaining entire application services to receive the file, which is significantly more effort and architectural complexity for this use case.

Topics

#Cloud Storage#Cloud Pub/Sub#Event-driven architecture#GCP Integration

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice