Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team runs an e-commerce application on Google Kubernetes Engine (GKE) using Cloud SQL for product metadata and Cloud Storage for images. Currently, all services share one default service account with roles/editor and authenticate via a static JSON key.
You must optimize performance, reduce cost, and enforce fine-grained access control for two services:
Which solution should you implement?
OFFSET-based SQL pagination for Cloud SQL queries, perform direct uncached database lookups, and use Cloud Armor to cache dynamic catalog responses. Keep the shared service account with roles/editor, rely on IAM Recommender after 90 days to trim unused permissions, and pass the service account's bearer token directly to the external worker.This option attempts to manage large datasets with SQL OFFSET pagination, offload responses to Cloud Armor, and defer least-privilege enforcement to IAM Recommender while passing an unrestricted OAuth 2.0 bearer token to an external worker.
OFFSET queries force the database to scan and discard growing numbers of rows.roles/editor grants thousands of permissions across all Google Cloud services in production for at least 90 days before IAM Recommender generates insights.roles/owner, roles/editor, roles/viewer) are overly broad and discouraged in production environments.You were only looking to audit an existing legacy project after 90 days of traffic while adding edge DDoS filtering—though even then, roles/editor and raw bearer token sharing would remain critical security risks.
In production systems, IAM Recommender works best as a continuous hygiene tool alongside initial predefined roles and separate service accounts per trust boundary, while Memorystore for Redis serves as the low-latency data cache.
roles/storage.objectAdmin and roles/cloudsql.editor, and grant the external worker roles/iam.serviceAccountTokenCreator to mint access tokens.This approach relies on per-Pod local caching, unpaginated object listings, task-queued single-row writes, and a shared service account impersonated via roles/iam.serviceAccountTokenCreator.
roles/storage.objectAdmin and roles/cloudsql.editor gives the Catalog Reader destructive write/delete privileges it does not need.roles/iam.serviceAccountTokenCreator lets the external worker mint full-privilege access tokens for the shared service account rather than receiving a strictly downscoped token.roles/iam.serviceAccountTokenCreator is a sensitive role that enables service account impersonation and must be tightly restricted to trusted internal components such as a token broker.You were building an internal supervisor architecture where a trusted token broker uses roles/iam.serviceAccountTokenCreator to issue short-lived tokens for distinct least-privilege service accounts—never directly to an untrusted external worker on an over-privileged account.
Even when using Service Account Credentials API token minting, external callers accessing Cloud Storage should receive tokens restricted with Credential Access Boundaries so access is capped at the exact target objects.
maxResults and pageToken) for Cloud Storage listings, batch bulk Cloud SQL writes, and cache frequent metadata reads in Memorystore for Redis. Create dedicated service accounts per service with bucket-scoped roles/storage.objectViewer and roles/cloudsql.client, use Workload Identity Federation for GKE, and apply Credential Access Boundaries to downscope the external worker's token.This architecture combines cursor-based pagination, write batching, and in-memory caching with least-privilege Identity and Access Management (IAM), Workload Identity Federation for GKE, and Credential Access Boundaries to optimize both performance and security.
maxResults and pageToken) bounds the payload and execution time of Cloud Storage list calls.roles/storage.objectViewer prevents unnecessary project-wide read or write access.roles/cloudsql.client grants connectivity to Cloud SQL instances without granting administrative permissions such as setIamPolicy.Every performance bottleneck—unbounded object listings, repeated metadata reads, and unbatched writes—is addressed with purpose-built Google Cloud patterns while adhering strictly to production IAM best practices (no basic roles, no static keys, and smallest-scope role bindings).
roles/storage.legacyBucketOwner and roles/cloudsql.admin, and store rotated user-managed JSON service account keys in Secret Manager.This option attempts to avoid pagination by pulling full object lists into memory, uses Cloud Storage as a metadata cache, and relies on rotated user-managed service account keys alongside administrative and legacy IAM roles.
roles/cloudsql.admin and roles/storage.legacyBucketOwner violates the principle of least privilege, giving applications administrative control and permissions such as setIamPolicy across all buckets and databases.roles/storage.objectViewer.You were integrating a legacy external system outside Google Cloud that cannot support Workload Identity Federation and strictly required rotated static credentials—though administrative roles and unpaginated listings would still be inappropriate.
Using Secret Manager helps protect secrets at rest, but eliminating static keys altogether via Workload Identity Federation removes key-rotation operational overhead and credential-exfiltration risk.
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