Cloud Digital Leader Google Cloud Products and Services Practice Question
Which Google Cloud service allows you to run code in response to events (e.g., file upload to Cloud Storage) without provisioning servers?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Cloud Functions
Cloud Functions is a serverless event-driven compute service that executes code in response to events. Compute Engine and GKE require servers. App Engine is for web apps, not event-driven functions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Cloud Functions
Why this is correct
Cloud Functions is a serverless, event-driven compute service that executes code in response to specific triggers. It natively integrates with Google Cloud services such as Cloud Storage, Pub/Sub, and HTTP calls, automatically scaling the function instances as needed. You write and deploy a single-purpose function, and the platform handles the underlying infrastructure, so no server provisioning or cluster management is required. This makes it the direct answer for running code in response to events like a file upload or a message published to a topic.
- ✗
App Engine
Why it's wrong here
App Engine is a platform-as-a-service (PaaS) designed for hosting web applications and APIs, not for executing discrete, event-driven functions. While it can scale automatically and handle HTTP traffic, it expects you to deploy a full application (e.g., in Node.js, Python, or Java) rather than a single-purpose code snippet triggered by arbitrary cloud events. Though App Engine has Cron and push queues, these are not the same as the direct event triggers offered by Cloud Functions, and using App Engine for event-driven tasks would require additional infrastructure such as custom dispatch logic. Its primary model is always-on web serving, not reactive function execution.
- ✗
Compute Engine
Why it's wrong here
Compute Engine provides virtual machines (VMs) that you must provision, configure, and manage yourself, including choosing machine types, managing OS patches, and configuring autoscaling. To run code in response to an event, you would need to install an agent, set up a listener, or build custom polling logic—there is no built-in event trigger from Cloud Storage or Pub/Sub to individual VM instances. You also pay for the VM even when idle, and scaling requires creating instance groups or relying on external tools. This makes it a poor fit for lightweight, event-driven code that expects zero administration and per-invocation billing.
- ✗
Google Kubernetes Engine
Why it's wrong here
Google Kubernetes Engine (GKE) is a managed Kubernetes service for orchestrating containerized workloads, and it requires you to design, deploy, and maintain a Kubernetes cluster, including nodes, namespaces, autoscaling policies, and RBAC. GKE does not natively execute code in response to a Cloud Storage event; you would need to install eventing components (like Knative Eventing), configure a Broker/Trigger, and write a service or Job to handle the event. This adds significant operational overhead compared to the built-in event triggers of Cloud Functions. GKE is meant for long-running containerized applications or complex microservices architectures, not for simple single-purpose functions that need to react to cloud events with minimal setup.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
Learn chapter
Cloud Digital Transformation
Key term
Event
An event is any identifiable occurrence or action in a computer system, network, or application that can be logged, monitored, or analyzed for security or operational purposes.
Key term
Cloud Functions
Cloud Functions are serverless compute services that let you run single-purpose code in response to events without managing servers.
About these practice questions
One of 829 original GCDL practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.