What should the developer do next to meet the data retention requirements?
Create an S3 Lifecycle rule on the S3 bucket. Configure the rule to expire current versions of objects and permanently delete noncurrent versions 1 year after object creation.
Create an event notification for all object creation events in the S3 bucket. Configure the event notification to invoke an AWS Lambda function. Program the Lambda function to check the object creation date and to delete the object if the object is older than 1 year.
Create an event notification for all object removal events in the S3 bucket. Configure the event notification to invoke an AWS Lambda function. Program the Lambda function to check the object creation date and to delete the object if the object is older than 1 year.
Create an S3 Lifecycle rule on the S3 bucket. Configure the rule to delete expired object delete markers and permanently delete noncurrent versions 1 year after object creation.
Explanations:
This option correctly addresses the requirement by creating an S3 Lifecycle rule that will expire the current versions of objects and permanently delete noncurrent versions after 1 year. This meets the retention requirement directly and automates the deletion process.
This option relies on a Lambda function to manually check the creation date of objects and delete them if they are older than 1 year. This approach is not efficient or necessary, as it requires additional configuration and does not leverage S3’s built-in lifecycle management capabilities.
Similar to option B, this approach uses a Lambda function triggered by removal events. It is not suitable because it does not automatically manage the retention of the objects based on their creation date, and it would not effectively remove objects that are older than 1 year without considerable overhead.
This option mentions deleting expired object delete markers and permanently deleting noncurrent versions, but it does not address the requirement of expiring current versions after 1 year. While it involves lifecycle rules, it does not fully meet the retention requirement as stated.