Google Professional Cloud Developer Question 168
Single answerGoogle Cloud PlatformYour organization has a regulatory requirement to retain user transaction data for a minimum of 7 years and ensure that it cannot be deleted during this period. You are building a solution using Google Cloud Storage. How should you configure the bucket to meet this requirement?
- A
Enable Object Versioning on the bucket.
- B
Apply a Bucket Lock with a retention policy of 7 years.
- C
Use Lifecycle Management to delete objects older than 7 years.
- D
Encrypt the data with a Customer-Managed Encryption Key (CMEK) to control data access.
Show answer and explanation
Correct answer: B
Explanation
To meet the regulatory requirement of retaining data for at least 7 years and ensuring it cannot be deleted during this period, you must use a Bucket Lock with a retention policy. Bucket Lock enforces a WORM (Write Once, Read Many) model on data, preventing deletions or modifications within the defined retention period. Other options, like Object Versioning or CMEK, enhance features such as data recovery or encryption but do not guarantee compliance with the retention requirement.
- A. Incorrect.
Enabling Object Versioning allows you to retain previous versions of objects, but it does not prevent deletions, and thus does not meet the requirement to ensure data cannot be deleted.
- B. Correct.
Applying a Bucket Lock with a retention policy of 7 years prevents the deletion or modification of objects until the retention period expires, making this the correct and compliant choice.
- C. Incorrect.
Lifecycle Management is used to automate deletion of data, but it does not enforce retention policies and would not prevent accidental or intentional deletions before 7 years.
- D. Incorrect.
Encrypting data with a Customer-Managed Encryption Key (CMEK) enhances security by giving you control over encryption keys but does not address data retention or prevent deletions.