Ben Gorman

Ben Gorman

Life's a garden. Dig it.

There are two good ways to automate code in Google Cloud Platform

  1. Google Cloud Functions
  2. Google Cloud Run

Here we'll look at both.

Note

Cloud Functions is really just a wrapper around Cloud Run. That means Cloud Run is a more generic tool that's harder to use, whereas Cloud Functions is more restrictive but easier to use.

If you've never used either of these tools, I highly recommend you start out with Cloud Functions. Then switch the Cloud Run if necessary. (Cloud Functions is easier to learn but Cloud Run is more powerful.)

Cloud Functions vs Cloud Run

Cloud Functions Cloud Run
Max Runtime 1 hour 24 hours
Supported runtimes Node Python Go Java Ruby PHP .NET anything
Trigger Pub/Sub or HTTP HTTP

Google Firebase

Firebase provides a wrapper around Google Cloud Functions. So, in the context of Firebase, Google Cloud Functions behave a little bit differently. In the following posts, we'll be talking about raw Google Cloud Functions (i.e. functions created NOT within a Firebase project).

What you'll learn

The following articles teach you how to create, deploy, run, and automate some basic Python scripts on Google Cloud. In lieu of Python, you could use Node, Go, Java, etc. and 95% of what you'll learn in these tutorials will still apply.