Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Database Engineer practice bank has an additional 769 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
A database engineering team is automating daily backups and exports for their Cloud SQL, Spanner, and AlloyDB databases to a Cloud Storage bucket. They are implementing an event-driven architecture where Cloud Scheduler publishes a trigger message to a Pub/Sub topic, which invokes a Cloud Run function (2nd gen) configured with a dedicated service account to execute the export APIs.
The solution must meet the following requirements:
Which Cloud Scheduler and IAM configuration should the team implement?
0 */6 * * * (UTC) targeting the Pub/Sub topic, disable IAM authentication on the Cloud Run function, and assign the Cloud Scheduler Viewer and Storage Object Admin roles to the service account.This option schedules the Cloud Scheduler job with 0 */6 * * *, removes IAM authentication from the Cloud Run function endpoint, and grants the Cloud Scheduler Viewer (roles/cloudscheduler.viewer) and Storage Object Admin roles.
0 */6 * * * runs every 6 hours (at 00:00, 06:00, 12:00, and 18:00 UTC) instead of once daily at 00:00 UTC.cloudscheduler.jobs.get, cloudscheduler.jobs.list). The export function's runtime service account does not need to view Cloud Scheduler metadata to execute database exports.0 */6 * * * is designed for periodic batch collection four times a day rather than a single daily export.This pattern would only apply in a non-production environment requiring 6-hour batch runs with no ingress authentication restrictions, which contradicts both the daily schedule and IAM security constraints.
0 0 * * * (UTC) targeting the Pub/Sub topic, keep IAM authentication enabled on the Cloud Run function, and assign the Cloud Run Invoker and Storage Object Admin roles alongside the required database export permissions.This configuration establishes a secure, serverless orchestration pipeline using Cloud Scheduler, Pub/Sub, and Cloud Run functions (2nd gen). Cloud Scheduler acts as the time-based trigger, Pub/Sub decouples the scheduling event from execution, and the Cloud Run function runs the database export logic using a dedicated service account.
0 0 * * * evaluates to minute 0, hour 0, every day of the month, every month, and every day of the week. Pairing this with the UTC timezone ensures the job runs precisely at midnight UTC once every 24 hours.roles/run.invoker) role is required so the Pub/Sub push subscription can authenticate and invoke the underlying service. The Storage Object Admin role permits the function's service account to write, overwrite, and manage exported database files and state objects in the destination Cloud Storage bucket.Unlike options with overly frequent cron schedules or missing invocation roles, this setup matches the exact daily cadence while satisfying every IAM boundary needed for secure service-to-service communication and Cloud Storage persistence.
0 * * * * (UTC) targeting the Pub/Sub topic, and assign the Cloud Scheduler Job Runner and Storage Object Admin roles to the service account.This option schedules a Cloud Scheduler job with the 0 * * * * cron expression and assigns the Cloud Scheduler Job Runner (roles/cloudscheduler.jobRunner) and Storage Object Admin roles to the function's service account.
0 * * * * triggers at minute 0 of every hour rather than once per day at 00:00 UTC. Running full database exports for Cloud SQL, Spanner, and AlloyDB 24 times a day instead of once daily wastes compute resources, increases Cloud Storage costs, and can cause overlapping export operations.cloudscheduler.jobs.run to manually execute Cloud Scheduler jobs. It does not grant permission for Pub/Sub to invoke an IAM-authenticated 2nd gen Cloud Run function, causing trigger deliveries to fail with HTTP 403 Forbidden errors.0 * * * * is suited for hourly incremental polling rather than daily full database exports.roles/cloudscheduler.jobRunner is intended for operators or automation scripts that manually force-run existing Cloud Scheduler jobs.roles/run.invoker) on the receiving service so the Pub/Sub subscription's service account can deliver authenticated push requests.This setup would be relevant only if the goal were to run an hourly job and grant an operator permission to manually trigger Cloud Scheduler jobs, while separately granting Cloud Run Invoker for the Pub/Sub trigger.
0 0 * * * (UTC) targeting the Pub/Sub topic, and assign only the Cloud Scheduler Admin and Cloud Functions Invoker roles to the service account.This configuration uses the correct daily cron schedule (0 0 * * *) but assigns Cloud Scheduler Admin (roles/cloudscheduler.admin) and Cloud Functions Invoker to the service account while omitting Cloud Run Invoker and Storage Object Admin.
roles/run.invoker) prevents the triggering Pub/Sub service from authenticating against the underlying Cloud Run service endpoint.cloudscheduler.jobs.*), which violates the principle of least privilege because the function never manages scheduler jobs itself.The cron expression 0 0 * * * is valid for midnight UTC, so this approach would work only if Cloud Scheduler Admin were replaced with Storage Object Admin and Cloud Run Invoker were added for the 2nd gen service.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated