- Newest
- Most votes
- Most comments
Hi,
Did you properly activate so-called data events
in your CloudTrail setup ? By default, they are not activated
See https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-cloudtrail-logging-for-s3.html#enable-cloudtrail-events for all details.
Best,
Didier
It's explained in documentation that the coverage of CloudTrail data event logging is somewhat different from S3 server access logging. The comparison table in this documentation article explicitly states that "Logging of keys in a batch delete operation" is covered by S3 server access logging but not by CloudTrail data event logs: https://docs.aws.amazon.com/AmazonS3/latest/userguide/logging-with-S3.html
If you have S3 server access logs enabled for your bucket, you'll find one REST.POST.MULTI_OBJECT_DELETE
operation there for the DeleteObjects API call, and for each individual object deleted as a consequence, there'll be a separate BATCH.DELETE.OBJECT
log entry including the key of the specific object that was deleted.
The DeleteObjects API call can delete multiple objects in a single request. The CloudTrail log captures the fact that the operation occurred but does not include a detailed list of all objects deleted. The actual list of objects deleted might be in the request payload, which CloudTrail does not log by default.
CloudTrail events are limited in size, and including the entire list of objects (especially in a bulk delete operation) could exceed those limits. Therefore, AWS often omits this detailed information from the CloudTrail logs. The logs are more focused on recording the API call, the user who made the call, and the bucket affected rather than the specific contents of the request.
Looking at the docs for object level logging in CloudTrail, object level logging does support what you're asking for. However it's good to note that if you have not enabled that object level logging prior to the event, it will not populate it afterwards. Only when the request is done.
So review your logging configuration, and go through the bucket where you log data events.
Relevant content
- asked 9 months ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
I’ve already activated data events for CloudTrail, but I’m not seeing the deleted objects data in the logs.