You develop an API in Python 3 that performs CRUD on a production Cloud SQL instance. For secure, reliable, minimal-effort access, what should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Use the Cloud SQL Python connector library with the Cloud SQL Auth proxy and grant the service account cloudsql.instances.connect permission..
Why this is the answer
The Cloud SQL Python connector library, combined with the Cloud SQL Auth proxy, provides a secure, reliable, and low-effort way to connect to Cloud SQL from Python applications. The connector handles authentication and encryption automatically, leveraging IAM for secure access. Granting the service account cloudsql.instances.connect permission is the minimal and correct permission for this connection method. Using Cloud Composer is an orchestration tool, not a direct connection method for an API. Calling the Cloud SQL REST API directly is less efficient and secure for application-level database interactions compared to a dedicated connector. The Cloud SQL emulator is for local development and testing, not for production access from an API.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed