Google Associate Cloud EngineerDeploying and implementing a cloud solutionEasy

A developer needs to deploy a serverless function that is triggered by new file uploads to a specific Cloud Storage bucket. The function will perform image resizing and save the resized image back to another bucket. Which Google Cloud service should the developer use?

  1. ACloud Run
  2. BApp Engine Standard
  3. CCompute Engine
  4. DCloud Functions
Show answer & explanation

Correct answer: D. Cloud Functions

Cloud Functions is a serverless execution environment for event-driven code. It can be directly triggered by events from Cloud Storage (e.g., object finalization), making it ideal for processing file uploads.

Why the other options are wrong

  • A. Cloud Run is for general-purpose containerized applications and services, not typically for discrete, event-driven functions.
  • B. App Engine Standard is a platform for web applications and APIs, not ideal for simple event-triggered functions.
  • C. Compute Engine provides virtual machines and is not a serverless, event-driven compute platform.

Google Cloud Functions

A serverless execution environment for building and connecting cloud services through event-driven functions.

  • Executes code in response to events (e.g., Cloud Storage uploads, Pub/Sub messages).
  • Fully managed and scales automatically.
  • Supports various programming languages (Node.js, Python, Go, Java, .NET, Ruby, PHP).

Memory trick: Functions are 'functional' for event triggers.

More Deploying and implementing a cloud solution questions