nerdexam
GoogleGoogle

PROFESSIONAL-CLOUD-DEVELOPER · Question #356

PROFESSIONAL-CLOUD-DEVELOPER Question #356: Real Exam Question with Answer & Explanation

The correct answer is A: Create a Cloud Run function that is triggered by a create type event in Firestore.. Using a Cloud Function that triggers on a create event in Firestore provides a serverless, event- driven solution, minimizing deployment and infrastructure management. When a new order is created in Firestore, the Cloud Function is automatically triggered, allowing it to send a c

Building and Testing Applications

Question

You are developing a new ecommerce website for your company. You want customers to receive a customized email notification when they place an order. You need to configure this email service while minimizing deployment effort. What should you do?

Options

  • ACreate a Cloud Run function that is triggered by a create type event in Firestore.
  • BCreate an email-sending application hosted on Compute Engine that is invoked by an HTTP
  • CCreate an email notification channel, and set up an alerting policy that is based on log metrics
  • DUse Pub/Sub to send an email when the orders/ API returns an HTTP response of 200 OK.

Explanation

Using a Cloud Function that triggers on a create event in Firestore provides a serverless, event- driven solution, minimizing deployment and infrastructure management. When a new order is created in Firestore, the Cloud Function is automatically triggered, allowing it to send a customized email notification to the customer. This approach requires minimal setup, scales automatically, and aligns with best practices for event-driven architectures. Other options like hosting an application on Compute Engine or setting up an alerting policy based on log metrics would require more configuration and management effort, while Pub/Sub with an HTTP response trigger lacks direct integration for event-based triggers from Firestore.

Topics

#Cloud Run#Firestore#Serverless#Event-Driven Architecture

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER PracticeBrowse All PROFESSIONAL-CLOUD-DEVELOPER Questions