hands-on lab

Connecting to a Cloud SQL Database with the Cloud SQL Auth Proxy

Intermediate
Up to 1h 15m
84
5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

The way developers establish database connections is an important aspect of managing a Cloud SQL database. Solid connection management practices help to minimize downtime and security risks. Developers must consider how a connection is established, which connections are authorized, and how users or other services are authenticated. This lab will cover how to establish secure connections with the Cloud SQL Auth proxy.

The Cloud SQL Auth proxy uses Identity and Access Management (IAM) permissions to authorize and secure connections to Cloud SQL database instances. Like most proxy tools, it serves as the intermediary authority on connection authorizations.

In this lab, you will create a Cloud SQL database instance and learn how to securely connect to the instance using the Cloud SQL Auth Proxy and a custom IAM Service Account.

Learning Objectives

Upon completion of this intermediate-level lab, you will be able to:

  • Create a Cloud SQL Database instance that serves a PostgreSQL database
  • Connect to a Cloud SQL Database instance using the Cloud SQL Auth proxy

Intended Audience

  • Candidates for the Google Associate Cloud Engineer exam
  • Candidates for the Google Data Engineer exam
  • Google Cloud practitioners

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • General knowledge of the Google Cloud SQL service
Environment before
Environment after
About the author
Avatar
Jun Fritz, opens in a new tab
Cloud Labs Developer
Students
39,533
Labs
106
Courses
1
Learning paths
6

Jun is a Cloud Labs Developer with previous experience as a Software Engineer and Cloud Developer. He holds the AWS Certified Solutions Architect and DevOps Engineer Professional certifications. He also holds the AWS Certified Solutions Architect, Developer, and SysOps Administrator Associate certifications. 

Jun is focused on giving back to the growing cloud community by sharing his knowledge and experience with students and creating engaging content. 

Covered topics
Lab steps
Signing In to the Google Cloud Console
Creating a PostgreSQL Database using Cloud SQL
Understanding the Cloud SQL Auth Proxy and Custom Service Accounts
Connecting to a Cloud SQL Instance using the Cloud SQL Auth Proxy