This lab walks you through GCP Cloud Functions
We will learn the difference between Cloud Functions, App Engine, and Cloud Run.
You will be creating a Simple Cloud Function listing names of all the VM Instances in the Project.
Duration: 45 minutes
Cloud Function lets you deploy snippets of code (functions) written in a limited set of programming languages, to natively handle HTTP requests or events from many GCP sources.
Cloud Functions lets you establish triggers on a wide variety of events that can come from a variety of Cloud and Firebase products.
Cloud Functions server instances handle requests in a serial manner, which is not configurable whereas Cloud Run instances handle requests in a parallel manner, and the level of parallelism is configurable.
Cloud Functions allow you to choose from a set of programming languages and runtimes that is not configurable without requiring that you do anything other than deploying your code whereas Cloud Run allows you to choose any kind of backend configuration, but it requires that you supply a docker configuration that creates the runtime environment (which is more work).
Login into GCP Console.
Creating a Cloud Function to list all the VM instances in the Project.
Once you start the lab, 1 VM Instance will be provisioned named whizlabs-cloud-function.
Trigger the function through HTTP Request to print the list of VM instances in the Project.