Cloud Functions Receiving Events from Cloud Storage
Cloud Storage is GCP’s object storage. This service allows you to store files in containers known as buckets. We will go into more detail about Cloud Storage in Chapter 11, but for this chapter you just need to understand that Cloud Storage uses buckets to store files. When files are created, deleted, or archived, or their metadata changes, an event can invoke a function. Let’s go through an example of deploying a function for Cloud Storage Events using Cloud Console and gcloud commands in Cloud SDK and Cloud Shell.
Deploying a Cloud Function for Cloud Storage Events Using Cloud Console
To create a function using Cloud Console, select the Cloud Function options from the vertical menu in the console, as in Figure 10.1.

FIGURE 10.1 Opening the Cloud Functions console
In the Cloud Functions console, you may be prompted to enable the Cloud Functions API if it is not already enabled. After the Cloud Functions API is enabled...