Google Cloud Associate Cloud Engineer — Question 198
You are working for a hospital that stores its medical images in an on-premises data room. The hospital wants to use Cloud Storage for archival storage of these images. The hospital wants an automated process to upload any new medical images to Cloud Storage. You need to design and implement a solution. What should you do?
Answer options
- A. Create a Pub/Sub topic, and enable a Cloud Storage trigger for the Pub/Sub topic. Create an application that sends all medical images to the Pub/Sub topic.
- B. Create a script that uses the gcloud storage command to synchronize the on-premises storage with Cloud Storage, Schedule the script as a cron job.
- C. Create a Pub/Sub topic, and create a Cloud Function connected to the topic that writes data to Cloud Storage. Create an application that sends all medical images to the Pub/Sub topic.
- D. In the Google Cloud console, go to Cloud Storage. Upload the relevant images to the appropriate bucket.
Correct answer: B
Explanation
The correct answer is B because creating a script to use the gcloud storage command allows for efficient synchronization of on-premises storage with Cloud Storage, making it suitable for an automated approach. Option A is incorrect as it requires a more complex setup with Pub/Sub that is not necessary for simple uploads. Option C, while it includes automation, involves additional components that may complicate the process. Option D does not provide automation for new images, making it unsuitable for the hospital's requirements.