Google Professional Cloud Developer Question 166
Select 2Google Cloud PlatformYour team is building a cloud-native application on Google Cloud that processes sensitive customer data. The legal team has mandated a data retention policy requiring all customer data to be retained for 5 years and automatically deleted afterward. Which combination of approaches should you implement to enforce this requirement effectively?
- A
Use Cloud Storage Bucket Lifecycle Management to configure object expiration after 5 years.
- B
Develop a custom script to manually delete data older than 5 years using Cloud Functions.
- C
Store the data in BigQuery and configure a table expiration time of 5 years.
- D
Enable Object Versioning on Cloud Storage to retain all data versions indefinitely.
- E
Use a Pub/Sub subscription with a message retention policy of 5 years.
Show answer and explanation
Correct answers: A, C
Explanation
To meet the 5-year data retention requirement, you should use native Google Cloud features that automate compliance with minimal manual intervention. Cloud Storage Bucket Lifecycle Management and BigQuery table expiration are purpose-built for managing retention policies, ensuring data is automatically deleted after the specified time period. These options are more reliable and cost-effective than custom scripts or unrelated features like Object Versioning or Pub/Sub retention settings.
- A. Correct.
Cloud Storage Bucket Lifecycle Management is a built-in feature that allows you to automatically delete objects after a specified period, making it suitable for enforcing data retention requirements.
- B. Incorrect.
While a custom script might work, it introduces unnecessary complexity and maintenance overhead compared to native Google Cloud features designed for this purpose.
- C. Correct.
BigQuery table expiration is a native feature that allows you to set a time-to-live for tables, making it an effective way to enforce data retention policies.
- D. Incorrect.
Enabling Object Versioning retains all versions of an object indefinitely, which contradicts the requirement to delete data after 5 years.
- E. Incorrect.
Pub/Sub message retention policy is not designed for long-term data storage and retention policies; it is meant for short-term message processing.