Google Cloud Professional Cloud Security Engineer — Question 354
You are deploying a web application hosted on Compute Engine. A business requirement mandates that application logs are preserved for 12 years and data is kept within European boundaries. You want to implement a storage solution that minimizes overhead and is cost-effective. What should you do?
Answer options
- A. Create a Cloud Storage bucket to store your logs in the EUROPE-WEST1 region. Modify your application code to ship logs directly to your bucket for increased efficiency.
- B. Configure your Compute Engine instances to use the Google Cloud's operations suite Cloud Logging agent to send application logs to a custom log bucket in the EUROPE-WEST1 region with a custom retention of 12 years.
- C. Use a Pub/Sub topic to forward your application logs to a Cloud Storage bucket in the EUROPE-WEST1 region.
- D. Configure a custom retention policy of 12 years on your Google Cloud's operations suite log bucket in the EUROPE-WEST1 region.
Correct answer: A
Explanation
The correct answer is A because creating a Cloud Storage bucket directly allows for efficient logging with minimal overhead, ensuring logs are stored in the required region. Option B involves using the Cloud Logging agent which adds complexity, while C introduces unnecessary components with Pub/Sub, and D does not address the direct logging efficiency required.