Cloud Function
ELI5 — The Vibe Check
A cloud function is a piece of code you deploy to the cloud that runs when triggered — by an HTTP request, a file upload, a timer, or another event. You don't manage any server. Write the function, deploy it, forget about infrastructure. GCP Cloud Functions, AWS Lambda, and Azure Functions are all cloud functions.
Real Talk
Cloud functions are event-driven, serverless compute units deployed to managed runtimes. Each function handles a single trigger type and is independently deployable. Providers auto-scale from zero to thousands of concurrent executions. Suitable for webhooks, data transformation, background jobs, and API backends.
Show Me The Code
// GCP Cloud Function (gen 2)
import functions from '@google-cloud/functions-framework';
functions.http('myFunction', (req, res) => {
const name = req.query.name || 'World';
res.send(`Hello, ${name}!`);
});
When You'll Hear This
"Write a cloud function to send the welcome email on user signup." / "Cloud functions are billed per invocation — great for low-traffic features."
Related Terms
API Gateway
An API Gateway is the front door for all your APIs.
Cold Start
A cold start is the delay you get when a serverless function hasn't been used for a while and the cloud needs to spin up a fresh container to run it.
Edge Function
Edge functions run your code at the CDN edge — meaning close to the user, not in some faraway data center.
FaaS (Function as a Service)
FaaS is when you write a tiny function and deploy it to the cloud, and it only runs (and charges you) when someone calls it.
Lambda
AWS Lambda is where you upload a function and AWS runs it when something happens — an HTTP request, a file upload, a database change.
Serverless
Serverless doesn't mean there are no servers — it means YOU don't have to think about servers. Someone else manages them, scales them, and patches them.