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.
Your team is configuring IAM access controls for a production analytics workflow that spans Cloud SQL for MySQL and BigQuery. You must enforce the principle of least privilege while meeting the following requirements:
sales_analytics), without accessing any other datasets in the project.Which IAM role assignment strategy should you implement?
cloudsql.instances.export for the automation service account, grant roles/storage.objectAdmin to the Cloud SQL instance's service account on the target bucket, and grant roles/bigquery.dataViewer to the analyst group on the sales_analytics dataset.This strategy combines custom IAM roles, predefined IAM roles, and resource-level role bindings to enforce the principle of least privilege across multiple Google Cloud services. Rather than granting broad project-wide permissions, each identity receives only the exact permissions required at the lowest possible level in the resource hierarchy.
roles/cloudsql.editor) role allows initiating exports, it also grants permissions to modify or delete instances. Creating a project-level custom role with only the cloudsql.instances.export permission ensures the automation service account can trigger exports without altering instance configurations.roles/storage.objectAdmin to the instance's service account directly on the target Cloud Storage bucket enables reading and writing export files while preventing access to other buckets in the project.roles/bigquery.dataViewer) role at the sales_analytics dataset level grants bigquery.tables.getData and related read permissions exclusively for that dataset, keeping all other datasets in the project inaccessible.roles/bigquery.dataViewer and roles/storage.objectAdmin) for standard tasks so Google Cloud manages permission updates.Compared to granting roles/cloudsql.editor, basic roles, or project-level bindings, this approach eliminates unnecessary administrative and cross-resource privileges while keeping custom role maintenance minimal.
roles/editor to the automation service account at the project level, grant roles/storage.objectAdmin to the Cloud SQL instance's service account on the target bucket, and assign the BigQuery Viewer basic role to the analyst group on the sales_analytics dataset.This configuration uses basic roles—specifically the legacy project-level Editor (roles/editor) role and the legacy BigQuery dataset-level Viewer basic role—combined with a bucket-level predefined role for Cloud Storage.
roles/editor basic role includes thousands of permissions across nearly all Google Cloud services. It grants the automation service account permissions to modify or delete Cloud SQL instances, create resources, and alter other services, violating both the explicit Cloud SQL restriction and general production security best practices.Owner, Editor, Viewer) predate IAM and provide uneven, overly broad access compared to predefined BigQuery IAM roles. Google Cloud explicitly discourages granting basic roles to datasets in favor of granular predefined roles such as roles/bigquery.dataViewer.roles/editor are not scoped to a single database service; they grant broad write and modification rights across compute, storage, and networking resources.cloudsql.instances.export.Owner basic role does not even grant table data access permissions).You were working in an isolated non-production sandbox or test environment where broad exploratory permissions were intentionally acceptable and strict least privilege was not enforced.
In production environments, basic roles should be avoided unless no alternative exists. Tools such as IAM Recommender and Policy Simulator help replace legacy basic roles with scoped predefined or custom roles without disrupting workloads.
roles/cloudsql.editor to the automation service account at the project level, grant roles/storage.objectAdmin to the Cloud SQL instance's service account at the project level, and grant roles/bigquery.dataViewer to the analyst group at the project level.This approach relies entirely on predefined IAM roles bound at the project level of the Google Cloud resource hierarchy. Each predefined role (roles/cloudsql.editor, roles/storage.objectAdmin, and roles/bigquery.dataViewer) bundles standard permissions maintained by Google Cloud for a specific service.
roles/cloudsql.editor) role grants broad permissions to manage, update, and modify Cloud SQL resources across the project. This directly violates the requirement that the automation service account must not have permissions to modify or delete Cloud SQL instances.roles/bigquery.dataViewer at the project level gives the analyst group read access to every BigQuery dataset in the project, rather than restricting access to sales_analytics.roles/storage.objectAdmin at the project level allows the Cloud SQL service account to read, write, and delete objects in every bucket in the project instead of only the dedicated export bucket.The automation service account needed to manage Cloud SQL instances as well as export data, and the analyst group required read-only access to all BigQuery datasets across the entire project.
When a predefined role contains unwanted permissions, you should create a custom role with only the necessary permissions and apply resource-level bindings whenever access can be scoped to a single bucket or dataset.
cloudsql.instances.export for the automation service account, grant roles/storage.objectAdmin to the automation service account on the target bucket, and grant roles/bigquery.dataViewer to the analyst group on the sales_analytics dataset.This option attempts to use a custom IAM role scoped at the folder level for Cloud SQL exports while assigning resource-level predefined roles on the Cloud Storage bucket and the BigQuery dataset.
roles/storage.objectAdmin only to the automation service account will cause the Cloud SQL export operation to fail with a permissions error on the bucket, while unnecessarily giving the automation account direct object-admin rights on the bucket.roles/bigquery.dataViewer on the sales_analytics dataset is the right approach for the analyst requirement, but the other two components make this strategy non-functional.There is no scenario where a folder-level custom role works in Google Cloud IAM; to make this valid, the custom role must be defined at the project or organization level and roles/storage.objectAdmin must be granted to the Cloud SQL instance's service account.
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