A developer must run small pieces of code in direct response to Google Cloud events, such as an object being written to a Cloud Storage bucket, with the least infrastructure to manage. Which statement about Cloud Run functions is accurate for this event-driven need?
- ACloud Run functions cannot respond to Cloud Storage events and must instead be invoked only by a scheduled Compute Engine cron job that polls the bucket.
- BCloud Run functions require you to provision and patch a dedicated node pool in Google Kubernetes Engine before any event trigger will fire.
- CCloud Run functions handle events but bill for a continuously running Compute Engine VM per function, so they carry the same operational overhead as a self-managed instance.
- DCloud Run functions run your code in response to events on managed infrastructure, and can be triggered by Cloud Storage events delivered through Eventarc. Correct
Why A is wrong: This is tempting if you assume polling is required, but it is wrong: Cloud Run functions integrate with Eventarc to receive Cloud Storage events directly, so no polling VM is needed.
Why B is wrong: This confuses functions with GKE-hosted workloads; fully managed Cloud Run functions run on Google-managed infrastructure and need no customer-provisioned node pool to receive triggers.
Why C is wrong: This misstates the model: Cloud Run functions scale with events and do not bill for a per-function always-on VM, so their operational overhead is far lower than a self-managed instance.
Why D is correct: Cloud Run functions are the event-driven serverless option that runs code on Google-managed infrastructure and consumes events, including Cloud Storage object changes routed through Eventarc, matching the low-management event need.