SAA-C03 Question 494
Single answerA financial services company is required by regulatory compliance to retain transaction logs for 7 years but must delete them immediately after the retention period ends. These logs are stored in Amazon S3. Which approach should you use to meet this requirement while optimizing costs and ensuring compliance?
- A
Apply an S3 Lifecycle policy to transition the logs to S3 Glacier after 30 days and delete them after 7 years.
- B
Enable versioning on the S3 bucket and manually delete objects older than 7 years.
- C
Create a Lambda function triggered by an S3 event to delete objects older than 7 years.
- D
Use S3 Intelligent-Tiering to manage the logs and manually delete them after 7 years.
Show answer and explanation
Correct answer: A
Explanation
S3 Lifecycle policies are specifically designed to manage the lifecycle of objects in S3. By transitioning objects to lower-cost storage classes like S3 Glacier and automatically deleting them after the retention period, you can optimize costs and meet compliance requirements without manual intervention or custom code.
- A. Correct.
This is the correct approach. S3 Lifecycle policies allow you to define rules to transition objects to different storage classes (e.g., S3 Glacier) and automatically delete them after a specified period. This ensures cost optimization and compliance with retention requirements.
- B. Incorrect.
While enabling versioning can help with recovery of deleted or modified objects, it does not provide an automated way to delete objects after 7 years. Manual deletion is error-prone and does not meet compliance requirements effectively.
- C. Incorrect.
Using a Lambda function could work, but it is unnecessarily complex since S3 Lifecycle policies natively handle this use case more efficiently.
- D. Incorrect.
S3 Intelligent-Tiering is useful for optimizing storage costs based on access patterns but does not provide automated deletion after a specific retention period. Manual deletion would still be required, which is not ideal for compliance.