A software team needs to run a lightweight event-driven code snippet in Python whenever a new file is uploaded to a Cloud Storage bucket. The execution takes only a few seconds, and the team wants to deploy raw source code directly without managing container images or underlying infrastructure. Which Google Cloud compute service should they choose?
- Cloud FunctionsAnswer
- BCloud Run
- CCompute Engine
- DGoogle Kubernetes Engine (GKE)
Answer
Cloud Functions is the best serverless choice for executing lightweight, event-driven code in response to Cloud Storage events without container management.
Cloud Functions provides a serverless execution environment designed specifically to run event-driven code in response to Cloud Storage triggers, allowing deployment of source code directly with zero container maintenance.
Step-by-Step Solution
Key Concept
Selecting Cloud Functions for lightweight event-driven snippets vs Cloud Run for containerized applications.