SAA-C03 · Question #59
A company has stored millions of objects across multiple prefixes in an Amazon S3 bucket by using the Amazon S3 Glacier Deep Archive storage class. The company needs to delete all data older than 3…
The correct answer is D. Enable S3 Inventory. Create an AWS Lambda function to filter and delete objects. Invoke the. To meet the requirement of deleting objects older than 3 years while retaining certain data, this solution leverages serverless technologies to minimize operational overhead. S3 Inventory: S3 Inventory provides a flat file that lists all the objects in an S3 bucket and their…
Question
A company has stored millions of objects across multiple prefixes in an Amazon S3 bucket by using the Amazon S3 Glacier Deep Archive storage class. The company needs to delete all data older than 3 years except for a subset of data that must be retained. The company has identified the data that must be retained and wants to implement a serverless solution. Which solution will meet these requirements?
Options
- AUse S3 Inventory to list all objects. Use the AWS CLI to create a script that runs on an Amazon
- BUse AWS Batch to delete objects older than 3 years except for the data that must be retained
- CProvision an AWS Glue crawler to query objects older than 3 years. Save the manifest file of old
- DEnable S3 Inventory. Create an AWS Lambda function to filter and delete objects. Invoke the
How the community answered
(43 responses)- A16% (7)
- B9% (4)
- C30% (13)
- D44% (19)
Explanation
To meet the requirement of deleting objects older than 3 years while retaining certain data, this solution leverages serverless technologies to minimize operational overhead. S3 Inventory: S3 Inventory provides a flat file that lists all the objects in an S3 bucket and their metadata, which can be configured to include data such as the last modified date. This inventory can be generated daily or weekly. AWS Lambda Function: A Lambda function can be created to process the S3 Inventory report, filtering out the objects that need to be retained and identifying those that should be deleted. S3 Batch Operations: S3 Batch Operations can execute tasks such as object deletion at scale. By invoking the Lambda function through S3 Batch Operations, you can automate the process of deleting the identified objects, ensuring that the solution is serverless and requires minimal operational management. Why Not Other Options?: Option A (AWS CLI script on EC2): Running a script on an EC2 instance adds unnecessary operational overhead and is not serverless. Option B (AWS Batch): AWS Batch is designed for running large-scale batch computing workloads, which is overkill for this scenario. Option C (AWS Glue + script): AWS Glue is more suited for ETL tasks, and this approach would add unnecessary complexity compared to the serverless Lambda solution.
Community Discussion
No community discussion yet for this question.