- Lab
-
Libraries: If you want this lab, consider one of these libraries.
Troubleshooting Cloud Run Function Behavior
In this Google Cloud lab, you will troubleshoot a failing event-driven Cloud Run function that processes order files dropped into a Cloud Storage bucket. Using Cloud Logging, runtime metrics, and the function's configuration and identity, you will isolate why invocations are failing, remediate access, runtime configuration, and event-handling problems, while validating that each fix restores correct invocation behavior and the expected operational signals. The work mirrors a realistic on-call task where a deployed function has stopped producing output, and you must recover it without changing its code.
Lab Info
Table of Contents
-
Challenge
Inspect the event-driven invocation path and restore event delivery
- Inspect logs and runtime metrics to confirm the function is not being invoked even though files are being uploaded.
- Examine the event-source path, including the Eventarc trigger and its Pub/Sub-backed delivery, and observe how events are redelivered while invocation keeps failing.
- Isolate the event-handling condition that prevents the event source from successfully invoking the function.
- Remediate the condition so the event source can invoke the function.
- Upload a sample file and validate that the function is now invoked.
-
Challenge
Diagnose and remediate the access failure on the function's runtime identity
- Inspect logs and invocation results to isolate a permission error that occurs while the function is executing.
- Identify that the function's runtime service account cannot write to the output resource.
- Remediate by granting the runtime service account the required role on the output bucket.
- Upload a sample file and validate that a processed record is written and the permission error clears.
-
Challenge
Diagnose and remediate the runtime configuration failure
- Use runtime metrics and logs to isolate a configuration limit that causes failed or degraded execution on a larger input.
- Identify the insufficient memory setting on the function.
- Remediate by updating the function's runtime configuration to the required value, which produces a new revision.
- Upload the larger sample file and validate successful execution and healthy metrics.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.