Import data from Storage Bucket to Cloud SQL using Cloud Function

Lab Details:

  1. This lab walks you through GCP Cloud Function, Storage Bucket, and Cloud SQL

  2. Make sure, you have completed the previous labs about GCP Cloud Function, Storage Bucket, and Cloud SQL because here we will not go into detail about theory but we will connect these three services. If you have not completed the previous lab, we recommend you complete the previous lab first. 

  3. In this lab, we will create a bucket and upload a sample CSV file into the bucket ( We will provide the file)

  4. We will then create a Cloud SQL instance and database where the table will be created and records will be inserted using Cloud Function.

  5. We will then create a Cloud Function which will connect with Cloud SQL and Storage Bucket.

  6. Duration: 60 minutes

Note: Do not refresh the page after you click Start Lab, wait for a few seconds to get the credentials.
In case while login into Google, if it asks for verification, please enter your mobile number and verify with OTP, Don't worry this Google Account will be deleted after the lab.

Lab Overview:

In this lab, we will create a Google Cloud Storage Bucket where we will upload a Sample CSV containing user details, using Cloud Function we will first read the GCS Object first, and then using the same Function we will connect with Cloud SQL and create a table and insert the data into Database.

Lab Tasks:

  1. Login into the GCP Console.

  2. Creating a Cloud Storage Bucket.

  3. Creating a Cloud SQL Instance.

  4. Create a SQL Database.

  5. Creating a Cloud Function, deploy, and test.

  6. Using Cloud Shell, connect to DB Instance to check whether records are inserted successfully or not.

Join Whizlabs_Hands-On to Read the Rest of this Lab..and More!

Step 1 : Login to My-Account
Step 2 : Click on "Access Now" to view the course you have purchased
Step 3 : You will be taken to our Learn Management Solution (LMS) to access your Labs,Quiz and Video courses

Open Console