This article implies that S3 server access logging and CloudTrail data event logging would be equally effective at tracking object deletions. That is not correct. CloudTrail data events don't include the object keys or version IDs at all, when objects are deleted as part of a batch delete operation with the DeleteObjects API. I believe the management console uses DeleteObjects even to delete a single object or object version, making this a very typical situation.
Keys not being logged for batch deletes is mentioned as a limitation in this comparison table in documentation: https://docs.aws.amazon.com/AmazonS3/latest/userguide/logging-with-S3.html ("Logging of keys in a batch delete operation").
The solution is to use S3 server access logging to audit all object deletions, regardless of the method used to trigger each deletion, and not to rely solely on CloudTrail data event logging.
Please note that S3 server access logging is based on best-effort delivery [1]. In another word, it's informative but cannot be deemed as an auditing tool.
Reference: [1] https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html#LogDeliveryBestEffort
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
Relevant content
- asked a year ago
- asked 5 years ago
- asked 2 years ago
- asked 2 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago

