Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
Your organization requires real-time automated remediation of infrastructure configuration drift across its Google Cloud projects. Specifically, whenever a storage bucket or resource IAM policy is modified to grant public access, an automated Python remediation script must execute immediately to evaluate the change and revert non-compliant IAM bindings.
Which architecture should you implement to deploy and trigger this event-driven remediation script with minimal operational overhead and latency?
Configure a Cloud Scheduler cron job to trigger a Cloud Build pipeline every 15 minutes that queries Cloud Asset Inventory and resets non-compliant configurations.
Deploy the Python remediation script to Cloud Run functions using gcloud run deploy and configure an Eventarc trigger to route Cloud Audit Log events directly to the function.
Deploy the Python script to a persistent Compute Engine virtual machine that continuously polls the Cloud Logging API using the Cloud SDK at one-second intervals.
Set up an Artifact Registry automated vulnerability scanning trigger that invokes a containerized remediation script whenever base container images are rebuilt.
Configure a Cloud Scheduler cron job to trigger a Cloud Build pipeline every 15 minutes that queries Cloud Asset Inventory and resets non-compliant configurations.
Deploy the Python remediation script to Cloud Run functions using gcloud run deploy and configure an Eventarc trigger to route Cloud Audit Log events directly to the function.
Cloud Run functions (formerly Cloud Functions 2nd gen) provide a lightweight, event-driven serverless execution environment powered by Cloud Run. Combined with Eventarc, it enables developers to route events from over 130+ Google Cloud sources—including Cloud Audit Logs and Cloud Pub/Sub—directly to containerized or function-based runtimes without managing persistent infrastructure.
gcloud run deploy --function ... or via Infrastructure as Code (IaC).storage.setIamPermissions).This architecture directly couples event detection with serverless execution. Compared to scheduled polling or self-managed VMs, it guarantees sub-second response times for security remediation while maintaining zero baseline compute costs.
Deploy the Python script to a persistent Compute Engine virtual machine that continuously polls the Cloud Logging API using the Cloud SDK at one-second intervals.
Set up an Artifact Registry automated vulnerability scanning trigger that invokes a containerized remediation script whenever base container images are rebuilt.