SOA-C02 Question 110
Select 2A company is using an S3 bucket to store log files generated by their applications. To optimize storage costs, they want to ensure older log file versions are automatically deleted after a certain period of time while still maintaining version control for auditing purposes. How should the SysOps Administrator achieve this?
- A
Enable versioning on the S3 bucket and configure a lifecycle rule to expire non-current object versions after the desired retention period.
- B
Enable versioning on the S3 bucket and configure a lifecycle rule to transition older object versions to S3 Glacier after the desired retention period.
- C
Disable versioning on the S3 bucket and configure a lifecycle rule to delete all objects older than the desired retention period.
- D
Enable versioning on the S3 bucket and configure a lifecycle rule to delete current object versions after the desired retention period.
- E
Configure a lifecycle rule to permanently delete previous versions of objects without enabling versioning on the bucket.
Show answer and explanation
Correct answers: A, B
Explanation
To meet the requirements of maintaining version control for auditing while optimizing storage costs, versioning must be enabled on the S3 bucket. Lifecycle rules can then be used to either expire non-current object versions or transition them to lower-cost storage classes (e.g., S3 Glacier). This approach ensures that older versions are managed effectively without compromising the ability to audit object history.
- A. Correct.
Correct: Enabling versioning allows the bucket to maintain multiple versions of objects, and lifecycle rules can be configured to expire non-current versions to save on storage costs while maintaining version control.
- B. Correct.
Correct: Transitioning non-current object versions to a lower-cost storage class like S3 Glacier is a valid way to reduce costs for older versions that need to be retained for long-term storage.
- C. Incorrect.
Incorrect: Disabling versioning would prevent the bucket from maintaining object versions, which contradicts the requirement to maintain version control for auditing purposes.
- D. Incorrect.
Incorrect: Deleting current object versions does not align with the requirement to maintain version control and would result in data loss.
- E. Incorrect.
Incorrect: Lifecycle rules for deleting previous versions of objects can only be applied if versioning is enabled. Without versioning, all objects in the bucket are treated as the current version.