S3 Batch Operations with S3 Inventory for Lifecycle Deletion
Short answer
D Enable S3 Inventory and use S3 Batch Operations to invoke a Lambda function for filtering and deleting objects.
Question
Key Takeaways
The core concept tested is using S3 Batch Operations for large-scale management tasks, where the common trap is choosing manual scripting or EC2-based solutions instead of serverless batch processing.
This page explains how to use S3 Batch Operations combined with S3 Inventory reports to efficiently delete millions of objects in Amazon S3 Glacier Deep Archive based on age and retention criteria.
Common mistake: Learners often select EC2 or AWS Batch options (A or B) because they assume a 'script' implies compute resources, failing to recognize that S3 Batch Operations is the native, cost-optimized service for this scale.
Expert Analysis
Why the Answer Is Correct
Option D is the correct solution because it leverages S3 Inventory to generate a daily report of all objects in the bucket, providing the necessary metadata (like last modified date and storage class) to identify objects older than 3 years. S3 Batch Operations can then be configured to invoke an AWS Lambda function using these inventory reports, allowing for efficient, serverless filtering and deletion of the specified objects while excluding retained data. This approach is fully managed, scalable, and cost-effective for millions of objects.
Why the Other Options Are Wrong
Option A suggests running a script on an EC2 instance, which violates the 'serverless' requirement and introduces unnecessary operational overhead and cost for managing instances. Option B proposes AWS Batch, which is designed for distributed computing jobs rather than specific S3 object lifecycle management and also requires infrastructure setup. Option C involves an AWS Glue crawler, which is intended for cataloging data sources for analytics, not for deleting S3 objects, making it architecturally incorrect for this task.
Community Comment Notes
The community consensus strongly supports Option D, with users highlighting that S3 Inventory provides the flat file report needed to easily identify files older than three years. As noted by LeonSauveterre, the combination of Lambda for filtering and S3 Batch Operations for execution is the standard pattern for this scenario. Multiple users confirmed that D is the right answer, aligning with official AWS documentation on batch operations.
Official Reference
https://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
When you see 'millions of objects' and 'serverless' in an S3 question, immediately think of S3 Batch Operations. Avoid options that involve provisioning EC2 instances or complex data processing tools like Glue unless explicitly required for data transformation.
Frequently Asked Questions
Why not use an EC2 instance to run a deletion script?
Can S3 Batch Operations filter objects without Lambda?
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 5 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 5
-
muhammadahmer36 👍 3 Answered DEnable S3 Inventory. Create an AWS Lambda function to filter and delete objects. Invoke the Lambda function with S3 Batch Operations to delete objects by using the inventory reports.
-
LeonSauveterre 👍 1 Answered DTakeaways: 1. S3 Inventory provides a flat file report of the objects in an S3 bucket, including metadata such as storage class, size, and last modified date. Now you can easily find files "older than 3 years". 2. The Lambda function can be used to filter objects based on the company's requirements (excluding the subset of data to retain) and to delete the objects programmatically. 3. S3 Batch Operations allow the execution of bulk operations (e.g., delete operations) on a large number of S3 objects. A - Running a script on an EC2 instance is not serverless. B - AWS Batch is designed for batch computing workloads, not operations like deleting S3 objects. C - AWS Glue crawlers are designed to extract metadata and schema from data stored in S3 for querying and ETL processes, not for managing or deleting objects.
-
Salilgen 👍 1 Answered Dhttps://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops.html
-
agbor_tambe 👍 2yes D is the right answer
-
swati1508 👍 2D is correct
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAA-C03 Questions
Access 120 questions with complete answers and detailed explanations.
View Full SAA-C03 Practice Test →