You run stateless VMs and Cloud Run (VPC-connected, ingress=Internal). You created a service account with roles/run.invoker to schedule Cloud Run tasks, but testing returns 403 Permission Denied. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Use Cloud Scheduler with Pub/Sub to invoke Cloud Run..
Why this is the answer
The problem states that a service account with roles/run.invoker is used to schedule Cloud Run tasks, but it's receiving a 403 error. This indicates that the current method of scheduling is not working or is misconfigured. Using Cloud Scheduler with Pub/Sub to invoke Cloud Run is the correct solution. Cloud Scheduler can be configured to trigger a Pub/Sub topic at a specified interval. The Cloud Run service can then be configured to subscribe to this Pub/Sub topic. This decouples the scheduling from the Cloud Run invocation and is a standard, robust pattern for scheduled tasks. The roles/run.invoker role on the Cloud Run service account is sufficient for Pub/Sub to invoke the service. Granting roles/run.developer is incorrect because it provides broader permissions than necessary and doesn't address the underlying scheduling mechanism. Creating a cron job on Compute Engine VMs is not ideal for Cloud Run, as it tightly couples the scheduling to specific VMs and doesn't leverage Cloud Run's serverless nature. Changing Cloud Run ingress to "Internal and Cloud Load Balancing" is irrelevant to the scheduling problem and focuses on external access, not internal invocation.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed