A company has millions of objects stored across multiple prefixes in an Amazon S3 bucket using the S3 Glacier Deep Archive storage class. The company must delete all data older than 3 years except for a specific subset that must be retained. The retained data set is already identified. The company requires a serverless solution. Which solution meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Enable S3 Inventory. Create an AWS Lambda function to filter and delete objects and invoke the Lambda function with S3 Batch Operations using the inventory reports..
Why this is the answer
The correct solution leverages S3 Inventory to generate a list of objects, which can then be used with S3 Batch Operations. S3 Batch Operations can invoke an AWS Lambda function for each object in the inventory report. The Lambda function can contain the logic to filter objects older than 3 years and delete them, while excluding the specified retained subset. This provides a serverless, scalable, and efficient way to manage millions of objects. Using an EC2 instance with AWS CLI (first option) is not serverless. AWS Batch (second option) is not ideal for object-level operations across millions of objects and is not strictly serverless in the same way Lambda is. AWS Glue (third option) is designed for ETL and data cataloging, not for direct object deletion based on age, and would still require a separate deletion script.
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