Courseiva
easyMultiple Choice

Google PCA Practice Question: A developer needs to deploy a Python script that…

A developer needs to deploy a Python script that processes images uploaded to a Cloud Storage bucket. The script should run only when new objects are created, and should scale automatically with no idle costs. Which GCP service is most appropriate?

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 an event-driven serverless compute service that can be triggered by Cloud Storage events (e.g., object finalize). It scales automatically, runs only when triggered, and has no idle cost. Cloud Run also works for containers, but the script is lightweight and can be written as a function. App Engine requires manual scaling setup. Compute Engine would have idle cost.

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 event-driven: a Cloud Storage trigger fires on object creation, invoking the script only when new images arrive. It scales automatically per event and bills per invocation, so no idle costs accrue, satisfying both the trigger and cost constraints.

  • ✗

    App Engine Standard Environment

    Why it's wrong here

    App Engine Standard scales on HTTP requests to its own service, not on Cloud Storage object-creation events, so it cannot react to new uploads without extra wiring. It is tempting as a managed Python host, and would suit request-driven web apps, not bucket-event processing.

  • ✗

    Compute Engine with a startup script

    Why it's wrong here

    A Compute Engine instance runs continuously once started, so it cannot trigger solely on new object creation and incurs idle cost when no images arrive. It is tempting for arbitrary Python workloads, and would be correct for long-running processes needing persistent VMs, not event-driven, scale-to-zero execution.

  • ✗

    Cloud Run

    Why it's wrong here

    Cloud Run serves HTTP requests or runs jobs; it does not natively subscribe to Cloud Storage object-creation events, so it will not fire on new uploads without Eventarc plumbing. It is tempting as a scale-to-zero container host, and would be correct for request-driven containerised services, not bucket-triggered scripts.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

One of 807 original PCA 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCA 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 PCA exam.