GCP ACE · Question 26 · Domain 3.3: Deploying Cloud Run and Cloud Functions
You are writing a Python script that needs to execute automatically every time a new image file is uploaded to a specific Cloud Storage bucket. The script will resize the image and save it to a different bucket. You want to deploy this with minimal infrastructure management.
How should you deploy this script?
You are writing a Python script that needs to execute automatically every time a new image file is uploaded to a specific Cloud Storage bucket. The script will resize the image and save it to a different bucket. You want to deploy this with minimal infrastructure management.
How should you deploy this script?
Answer options:
Deploy the script on a Compute Engine instance and use a cron job to poll the bucket every minute.
Deploy the script to Cloud Run and configure Cloud Scheduler to trigger it.
Deploy the script as a Cloud Function triggered by Cloud Storage events.
Deploy the script to a GKE cluster and use a Kubernetes DaemonSet.
How to approach this question
Full Answer
Common mistakes
Practice the full GCP Associate Cloud Engineer Practice Exam 6
50 questions · hints · full answers · grading
Expert