Exam Information
Free practice questions with explanations
Google Professional-Cloud-Developer Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 18
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice Building and testing applications
A team maintains a Go service that publishes messages to Pub/Sub and writes to Firestore. Developers want to run unit and local integration tests on their laptops without touching shared cloud resources, and they want the emulators to behave like the cloud services. Which approach best meets these requirements?
Correct Answer: AExplanationThe gcloud CLI can start local emulators for Pub/Sub and Firestore, and the client libraries honor the emulator host environment variables so code runs against localhost without changing application logic. Pointing tests at a shared project violates the no-shared-resources requirement, and per-run Cloud Run deployments are slow and not local. Full mocking skips the real client behaviour the team wants to exercise, so it does not emulate the services as required.
-
2 Question 2 Single choice Building and testing applications
A company builds container images with Cloud Build from a monorepo and pushes them to Artifact Registry. Compliance requires that only images built by the approved trigger can be deployed to GKE, and that build provenance is verifiable at deploy time. The team already has a Binary Authorization policy in enforce mode. What is the next step to satisfy the requirement?
Correct Answer: DExplanationCloud Build can emit provenance attestations, and Binary Authorization enforces them through attestor requirements in the policy, which is what makes provenance verifiable at deploy time. Vulnerability scanning reports risk but does not gate deployment on build origin. Commit-SHA tags are traceable but are not cryptographically verified. Limiting read access does not confirm who built the image.
-
3 Question 3 Single choice Building and testing applications
A developer uses an AI coding assistant to draft unit tests for a Python function that parses Cloud Storage object metadata. The generated tests pass locally but the team wants them to be trustworthy before merging. Which practice best applies to writing unit tests with AI assistance?
Correct Answer: BExplanationGenerated tests can assert the wrong thing or merely echo the implementation, so reviewing assertions against the intended behaviour and checking that tests detect injected faults is the reliable way to validate them. Coverage alone does not prove the assertions are meaningful. Regenerating until green optimises for passing rather than correctness. Moving to production buckets is both unsafe and not a substitute for unit tests.
-
4 Question 4 Single choice Configuring cloud-native applications for deployment
A team deploys a Node.js API to Cloud Run directly from source using gcloud run deploy. The service must be invoked whenever a file is finalized in a Cloud Storage bucket, and the event must be delivered reliably with retries. The bucket is in the same region as the service. Which configuration meets these requirements?
Correct Answer: BExplanationAn Eventarc trigger delivers Cloud Storage finalized events to a Cloud Run service as CloudEvents, and it is backed by a service account that needs the Eventarc event receiver role to invoke the service. Polling with Cloud Scheduler or keeping instances warm is inefficient and misses the event-driven requirement. Signed URLs are for granting temporary access, not for configuring bucket notifications to a service.
-
5 Question 5 Single choice Configuring cloud-native applications for deployment
A GKE Deployment serves an API whose startup takes about 40 seconds while it loads a large model into memory. Users report that requests fail during rollouts, and the pods are marked ready before the model is loaded. The team wants traffic sent to a pod only when it can actually serve requests. What should they configure?
Correct Answer: BExplanationReadiness probes control whether a pod receives Service traffic, so a probe that checks the model-loaded endpoint keeps unready pods out of the load-balanced set until they can serve. A liveness probe restarts unhealthy containers and would kill pods still loading the model. A preStop sleep affects shutdown, not readiness at startup. Autoscaling changes replica count and does not stop traffic reaching pods that are not ready.
-
6 Question 6 Multiple choice Configuring cloud-native applications for deployment
A retail company exposes a set of REST APIs through a Cloud Run backend and wants version management, per-client rate limits, and API key authentication with centralised analytics. The security team also requires that the backend accept calls only from the gateway. Which TWO actions together meet these requirements? (Choose two.)
Correct Answer: C, EExplanationApigee provides proxy-level version routing, API key verification, quotas, and analytics, while Cloud Run ingress restrictions and IAM Invoker grants let only the gateway reach the backend. In-memory counters are per instance and do not enforce global limits across scaled instances. Unauthenticated invocation with client-supplied keys leaves the backend publicly reachable. Separate public services with no gateway lack centralised rate limiting and analytics.
-
7 Question 7 Order list Configuring cloud-native applications for deployment
A developer must make a Cloud Run service invoked by Pub/Sub messages published to a topic in a different project from the one hosting the service, using a dedicated service account and no public access. Arrange the steps in the correct order.
Drag the steps into the correct order, or use the arrows.
- Create a dedicated service account and grant it the Cloud Run Invoker role on the service.
- Grant the Pub/Sub service account permission to create tokens for the push service account.
- Verify delivery by publishing a test message and checking the Cloud Run request logs.
- Deploy the Cloud Run service with ingress restricted to allow only the required traffic.
- Create a Pub/Sub push subscription that targets the service URL and specifies the service account for OIDC authentication.
Correct Answer:- Grant the Pub/Sub service account permission to create tokens for the push service account.
- Create a dedicated service account and grant it the Cloud Run Invoker role on the service.
- Deploy the Cloud Run service with ingress restricted to allow only the required traffic.
- Create a Pub/Sub push subscription that targets the service URL and specifies the service account for OIDC authentication.
- Verify delivery by publishing a test message and checking the Cloud Run request logs.
ExplanationThe push identity must exist and be granted invoke rights before the subscription can authenticate, and the Pub/Sub service agent needs token-creation rights on that identity for OIDC tokens to be minted. The service must be deployed before the subscription targets its URL. Verification comes last, after all authentication and delivery settings are in place.
-
8 Question 8 Single choice Designing highly scalable, secure, and reliable cloud-native applications
A global e-commerce platform runs stateless APIs on Cloud Run in europe-west1 and us-central1 behind a global external Application Load Balancer. Shoppers' carts must stay with the same backend for a session, and cart data is stored in Memorystore for Redis in europe-west1 only. Users in the US report slow cart updates. Which change is the BEST fix?
Correct Answer: AExplanationSession affinity keeps a shopper on the same backend, and a Memorystore instance in the US region removes the transatlantic round trip for cart operations while preserving data locality where needed. An internal load balancer cannot serve public shoppers, so option B fails the requirement. Resizing the European instance does nothing for US latency. Moving everything to one region ignores European users and the stated multi-region setup.
-
9 Question 9 Single choice Designing highly scalable, secure, and reliable cloud-native applications
A payments team needs an API that clients call with low latency and high throughput, using a schema-defined contract with streaming responses for account balance updates. The team also wants to publish the API through a managed gateway with quotas and developer onboarding. Which design best fits these needs?
Correct Answer: BExplanationgRPC with protocol buffers provides a strongly typed contract and server-side streaming for balance updates, and a gateway that supports gRPC can apply quotas and authentication for onboarded developers. REST long polling is less efficient for streaming. Pub/Sub pull polling is not a client-facing API contract. Caching balance responses for an hour would serve stale financial data, which violates correctness.
-
10 Question 10 Single choice Designing highly scalable, secure, and reliable cloud-native applications
A media company runs a GKE cluster that processes video transcoding jobs. Batch jobs run for up to six hours, can be interrupted, and must restart from checkpoints. The finance team wants the lowest compute cost while keeping the on-demand web frontend on guaranteed capacity. Which configuration best optimises cost without breaking availability?
Correct Answer: CExplanationSpot VMs are the cheapest option for interruptible work, and GKE node pools with Spot VMs let interruptible batch pods tolerate the termination taint so they land only there, while the frontend stays on guaranteed on-demand capacity. Committed use discounts still cost more than Spot for interruptible jobs. A single external VM is a single point of failure with no restart management. Scaling the frontend to zero breaks availability during business hours.
-
11 Question 11 Drag and drop Integrating applications with Google Cloud services
A developer is building a service that reads from Firestore, stores uploaded reports in Cloud Storage, and publishes completion events for downstream systems. Match each requirement to the Google Cloud service that best meets it.
Drag each item onto its matching target. On a phone: tap an item, then tap a target.
Persist application documents with real-time listeners and offline mobile syncStore large uploaded report files with object versioning and lifecycle rulesDecouple completion events so multiple subscribers consume each message independentlyFirestoreCloud StorageMemorystorePub/SubCloud TasksCorrect Answer:- Store large uploaded report files with object versioning and lifecycle rules → Cloud Storage
- Persist application documents with real-time listeners and offline mobile sync → Firestore
- Decouple completion events so multiple subscribers consume each message independently → Pub/Sub
ExplanationCloud Storage holds unstructured objects with versioning and lifecycle management, while Firestore provides document storage with real-time listeners and offline mobile sync. Pub/Sub fans out messages to independent subscriptions, which is the decoupling requirement. Cloud Tasks targets a specific HTTP handler and is not a fan-out bus, and Memorystore is an in-memory cache rather than durable storage or messaging.
-
12 Question 12 Single choice Integrating applications with Google Cloud services
A service calls the Cloud Storage JSON API to list and download about 2 million small objects nightly. The job currently makes one request per object and hits 429 rate-limit responses, failing overnight. The team must finish within the window and keep the code simple. Which change is most appropriate?
Correct Answer: DExplanationBatching reduces request count, paginated listing with a restricted field mask limits returned data, and exponential backoff is the documented way to handle 429 responses from Cloud APIs. A fixed sleep of 10 seconds for two million objects cannot finish in the window. Immediate retries worsen throttling, and quota increases do not address the request pattern. Mirroring the full bucket adds cost and complexity without solving the access pattern.
-
13 Question 13 Single choice Integrating applications with Google Cloud services
A Cloud Run service connects to a Cloud SQL for PostgreSQL instance using private IP. Under load, the application logs show connection errors and the database reports that too many clients are connected. The team wants a fix that works across many instances as the service scales out. What should they implement?
Correct Answer: BExplanationEach Cloud Run instance opening unbounded connections multiplies connections as the service scales, so a bounded pool per instance combined with matching Cloud Run concurrency keeps the total within database limits. Raising max_connections only delays exhaustion and costs more. Per-instance users add authentication overhead without limiting connections. Opening and closing per query increases latency and churn.
-
14 Question 14 Dropdown Integrating applications with Google Cloud services
A developer wants to read a bucket object with the gcloud CLI while using a specific service account for a CI job, and to print only the object's name and size in JSON. Select the correct value for each blank in the command.
Choose the correct value for each blank.
gcloud storage objects list gs://reports-bucket -- --format=jsonCorrect Answer:gcloud storage objects list gs://reports-bucket --flatten=name --format=json
ExplanationThe correct blank is a formatting control that limits output fields, which is what the requirement describes, and the gcloud output projection syntax used by the format and flatten options handles field selection, so the CLI prints only the requested attributes. The filter option narrows which objects are returned rather than which fields appear. The limit option caps the number of results without affecting field content. The project option selects where the bucket is looked up, not what appears in the output.
-
15 Question 15 Single choice Integrating applications with Google Cloud services
A service account in project app-prod is used by a backend that calls the Cloud Pub/Sub and Cloud Storage APIs. Security audits show that the service account has the Editor role at project level, and the team wants to reduce it to the minimum needed. The service only publishes to one topic and reads from one bucket. Which action best applies least privilege?
Correct Answer: AExplanationGranting the Pub/Sub Publisher role on the specific topic and Storage Object Viewer on the specific bucket removes broad project access while keeping the two required capabilities. Owner is broader than Editor and violates least privilege. An IAM time condition still leaves excessive permissions in place. Storing keys in a repository is a security exposure and does not reduce permissions.
-
16 Question 16 Single choice Integrating applications with Google Cloud services
A service is deployed to Cloud Run and calls the Cloud Translation API from a Cloud Client Library. Logs show intermittent HTTP 503 errors during bursts. The team wants retries that do not create a thundering herd and that stop after a bounded time. Which retry strategy is appropriate?
Correct Answer: AExplanationExponential backoff with jitter spreads retries over time to prevent synchronised spikes, and a maximum delay plus overall deadline bounds the effort for transient 503 errors. Immediate unlimited retries amplify the burst. Fixed-interval infinite retries never terminate and hold resources. Manual retries cannot meet the latency and reliability needs of the service.
-
17 Question 17 Single choice Integrating applications with Google Cloud services
A Cloud Run service processes orders and needs to call an external fulfilment API that is slow and rate limited. Orders must be processed exactly once in terms of effects, with the ability to delay calls and retry failed ones without holding the HTTP request open. Which design fits best?
Correct Answer: CExplanationCloud Tasks supports rate limiting queues, scheduled delivery, retries, and named tasks for deduplication, which matches delayed and controlled calls to a rate-limited API without holding the request open. Synchronous calls tie up the request and fail on slow responses. Cron over bucket objects lacks per-order retry control and deduplication. A Pub/Sub topic with no dead-letter handling lacks a controlled failure path, and the short ack deadline would redeliver slow work.
-
18 Question 18 Single choice Integrating applications with Google Cloud services
A developer is troubleshooting a Cloud Run service where requests take 2 seconds longer than expected. Cloud Trace shows a long gap before the Firestore query span begins, and the Firestore client is created inside the request handler on every call. The team wants the fix that addresses the root cause with minimal change. What should they do?
Correct Answer: CExplanationCreating the Firestore client inside the handler repeats channel setup on every request, which is the gap Cloud Trace shows, and reusing a module-scope client amortises that cost across requests on each instance. More memory does not fix client initialisation overhead. Disabling tracing hides the symptom rather than fixing it. A keep-warm ping reduces cold starts but does not remove the per-request client creation cost.
These are 18 of the 265 questions in the full Professional-Cloud-Developer pack.
Get All 265 QuestionsGet all 265 questions & answers
Full access options for Google Professional-Cloud-Developer
Self-study
PDF Version
- 265 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 265 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 265 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the Professional-Cloud-Developer Exam (Professional Cloud Developer) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.