GCP ACE Practice / Study guide / Topics / Serverless Compute: Cloud Run & App Engine
Serverless Compute: Cloud Run & App Engine
What actually gets tested on the Google Cloud Associate Cloud Engineer exam,
the traps to know, and 6 free sample questions with full explanations.
Each project hosts exactly one App Engine app, in one region chosen at creation that can never be changed afterward — needing "another" App Engine app for something is a signal that a scenario actually needs a second project, not a second app inside the same one. Inside that single app, work is organized into services, each with versions, which is how App Engine supports multiple components without multiple apps.
gcloud run deploy creates or updates a Cloud Run service, and --allow-unauthenticated grants run.invoker to allUsers — a flag the exam likes to test because it's the exact mechanism by which a service becomes publicly reachable versus staying IAM-gated. Cloud Run and App Engine are genuinely different products (not two names for the same thing), and neither is the same as Cloud Functions, even though all three get grouped under "serverless."
Cloud Run's revision model is worth knowing in operational depth: prior revisions are kept, so traffic management can flip back to an older one instantly with no rebuild required, and traffic can be split by percentage across revisions natively — with tags for direct per-revision URLs, that's canary and blue/green deployment without any extra infrastructure. Deleting the service itself breaks its URL permanently; containers are immutable and ephemeral by design, which is why configuration belongs in environment variables or Secret Manager, not baked into the image.
Exam tips for this topic
- Each project has exactly one App Engine app in one immutable region — needing "another app" almost always means the scenario needs a second project.
- --allow-unauthenticated on gcloud run deploy grants run.invoker to allUsers — recognize it as the exact flag that makes a Cloud Run service publicly reachable.
- Cloud Run keeps prior revisions and splits traffic by percentage natively — instant rollback and canary deployment need no extra infrastructure beyond that.
Sample questions — Serverless Compute: Cloud Run & App Engine
These 6 questions are drawn from our full bank of 658 to show the style and
depth you'll get in the app. Each comes with the full explanation you'd see after answering
in a real practice session.
App Engine
App Engine allows how many applications per project?
- One app per project (with multiple services and versions inside it)Correct
- Unlimited apps per project, with one created automatically per deployed service
- One app per zone that the project has resources in
- Ten apps per billing account, pooled across projects
Why: Each project hosts exactly one App Engine app, in one region chosen at creation (immutable); the app subdivides into services, each with versions. Needing 'another app' typically means another service — or another project.
Cloud Run
You must deploy your container image to Cloud Run with public (unauthenticated) access, in one command. Which one?
- gcloud run deploy api --image=REGION-docker.pkg.dev/proj/repo/api:v1 --allow-unauthenticated --region=us-central1Correct
- gcloud app deploy --image
- kubectl apply cloudrun.yaml --public
- gcloud functions deploy api --container
Why: gcloud run deploy creates/updates the service and --allow-unauthenticated grants run.invoker to allUsers. App Engine and functions are different products; Cloud Run's kubectl-style YAML exists but isn't deployed via kubectl.
Serverless ops
Your finance team asks you to explain the Cloud Run line items on last month's bill. Cloud Run bills you for:
- CPU/memory during request processing (plus per-request fee), or continuously if min-instances/always-on CPU is setCorrect
- A flat monthly fee per service
- Number of container images stored
- Lines of code
Why: Default billing is usage-based per 100ms of allocated resources while serving; idle costs appear only with min-instances or instance-based billing. Image storage bills separately in Artifact Registry.
App Engine
Your repo has an app.yaml ready and you must deploy the App Engine app from source. Which command?
- gcloud app deployCorrect
- gcloud app push
- gcloud deploy app.yaml
- appcfg upload
Why: gcloud app deploy reads app.yaml and deploys a new version (optionally --no-promote to keep traffic on the old version). appcfg is long dead; the others don't exist.
Cloud Run
The revision you just deployed to your Cloud Run service is misbehaving in production. What is the fastest safe rollback?
- Route 100% traffic back to the previous revision (gcloud run services update-traffic api --to-revisions=PREV=100)Correct
- Delete the whole service and redeploy last week's code
- Restart the container
- Edit code live in the container
Why: Cloud Run keeps prior revisions; traffic management flips back instantly with no rebuild. Deleting the service breaks the URL; containers are immutable and ephemeral — live edits aren't a thing.
Serverless ops
Your App Engine app starts serving errors right after you deployed a new version. What is the immediate mitigation with zero redeploy?
- Shift traffic back to the previous healthy version (set-traffic / 'migrate traffic')Correct
- Delete the app
- Change the region
- Scale to zero
Why: Versions are kept; traffic can be re-pointed instantly. Deleting the app is catastrophic, the region is immutable, and scaling to zero is an outage.
Practice this for real
The app has dozens more questions on this and every other topic, with instant scoring,
spaced repetition of what you get wrong, and progress tracking across sessions.
Start practicing →
This topic shows up in
Other topics