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?
- ACloud Run
- BApp Engine Standard
- CCompute Engine
- DCloud Functions
Show answer & explanationAnswer & 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.