Cloud Digital Leader Google Cloud Products and Services Practice Question
A developer wants to deploy a Python script that runs in response to new files uploaded to a Cloud Storage bucket. The script performs simple image transformations. Which compute service is the BEST fit?
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 event-driven and designed for lightweight code that runs in response to events like Cloud Storage object changes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
App Engine
Why it's wrong here
App Engine is a fully managed PaaS for building web applications and APIs, requiring developers to structure code as a long-running web service. While it can scale to zero and has built-in load balancing, it does not natively trigger Python scripts on Cloud Storage object finalization without custom integration (e.g., Pub/Sub + custom endpoints). The request-based runtime model is not event-driven; it is designed for HTTP requests, not storage events. This makes it a poor fit for the described use case.
- ✓
Cloud Functions
Why this is correct
Cloud Functions is Google Cloud's event-driven serverless compute platform that runs Python code in response to specific triggers, including Cloud Storage events like object finalization. With a Storage trigger, the function is automatically invoked with the object metadata, eliminating the need to manage infrastructure or a web server. This matches the requirement to react to file uploads with low operational overhead and automatic scaling.
- ✗
Compute Engine
Why it's wrong here
Compute Engine provides VMs requiring continuous management, including patching, scaling, and uptime. To react to Storage events, you'd have to configure a trigger mechanism yourself (e.g., a Pub/Sub subscription or polling the bucket), then run a persistent server or cron process to execute the script. This introduces idle cost, complexity, and latency, and it doesn't provide granular event-driven invocation out of the box, making it unsuitable for a simple script.
- ✗
Cloud Run
Why it's wrong here
Cloud Run is a serverless container platform that can be invoked via HTTP requests or Pub/Sub events, but requires developers to containerize the Python script and build a web server or event processor. While it can scale to zero, it isn't natively wired to Cloud Storage object finalization without an intermediary adaptation (e.g., handling event in a receiver). It also doesn't provide the same zero-configuration storage trigger that Cloud Functions does.
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
Cloud storage
Cloud storage is a service that lets you save data on remote servers accessed over the internet instead of on your computer's hard drive.
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.
About these practice questions
Courseiva writes every GCDL question from scratch — 829 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.