AWS Certified Data Engineer – Associate (DEA-C01) — Question 190
A company stores server logs in an Amazon S3 bucket. The company needs to keep the logs for 1 year. The logs are not required after 1 year.
A data engineer needs a solution to automatically delete logs that are older than 1 year.
Which solution will meet these requirements with the LEAST operational overhead?
Answer options
- A. Define an S3 Lifecycle configuration to delete the logs after 1 year.
- B. Create an AWS Lambda function to delete the logs after 1 year.
- C. Schedule a cron job on an Amazon EC2 instance to delete the logs after 1 year.
- D. Configure an AWS Step Functions state machine to delete the logs after 1 year.
Correct answer: A
Explanation
The correct answer is A because defining an S3 Lifecycle configuration automates the deletion of logs after one year with minimal management required. Options B and C involve additional processes that require ongoing monitoring and maintenance, while D adds unnecessary complexity by using AWS Step Functions.