An application running on AWS Elastic Beanstalk generates user-specific PDFs, stores them in an unversioned Amazon S3 bucket, and emails them via Amazon SES. Users stop accessing PDFs after 90 days, and there are many obsolete PDFs in the bucket. A developer must remove PDFs older than 90 days with the least development effort. What should the developer do?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an S3 lifecycle rule on the bucket that expires objects after 90 days..
Why this is the answer
Creating an S3 lifecycle rule is the most efficient solution with the least development effort. S3 lifecycle rules are a native S3 feature that automatically manages objects based on predefined policies, including expiration. This approach requires no code changes or external compute resources. Modifying application code or creating a Lambda function to scan and delete objects would involve significant development effort, ongoing maintenance, and incur additional costs for compute time. Organizing objects with date-based prefixes and using a Lambda function to delete them is also a custom solution requiring development and maintenance, making it less efficient than a native S3 lifecycle rule.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed