Skip to main content

A brief introduction to Google Cloud Functions

·1 min

Introduction #

Google Cloud Functions are a convenient way to deploy micro-functions via serverless code.

Why serverless? #

A full on VM vs serverless #

Scenario: you’re running a simple extract function that you need to run on schedule #

  • install gcloud

  • Run gcloud init

  • Run gcloud auth login This will redirect you to the Google Auth screen - login in here GCloud will cache credentials under ~./keys here. Remember to change projects the next time.

And alternative is to use service keys to authenticate the cloud function - more on this later.

Run a simple example

Gcloud functions need triggers.

The get request from your browser triggers the cloud function.

An alternative way to test this is to run a curl command on your

Saadat Qadri
Author
Saadat Qadri
I’ve been fortunate to work with and learn from data, product and growth leaders at companies such as InVision, CB Insights, Breather, Karbon, FreshBooks, Wealthsimple, among others. I love getting my hands dirty in helping build infrastructure to power insights and growth. I’ve helped build data teams from scratch, and I’m learning how to a better manager every day. I’m an instructor at Lighthouse Labs for the Introduction to Data Analysis course.