Check provider logo

CloudTrail trail records all S3 object-level API operations for all buckets

cloudtrail_s3_dataevents_write_enabled

Severitylow
Servicecloudtrail
by Prowler

CloudTrail trails include S3 object-level data events for write (or all) operations across all current and future buckets, via classic or advanced selectors. This records actions like PutObject, DeleteObject, and multipart uploads at the object level.

Risk

Without object-level write logging, unauthorized or accidental changes and deletions can go unobserved, undermining data integrity and availability. Forensics lose visibility into who modified or removed objects, hindering detection of ransomware, rogue automation, or insider tampering.

Run this check with Prowler CLI

prowler aws --checks cloudtrail_s3_dataevents_write_enabled

Recommendation

Enable CloudTrail S3 data events for object-level write (and optionally read) across all buckets on a multi-Region trail. Apply least privilege to log storage, set lifecycle retention, and integrate alerts. Use advanced selectors to target sensitive buckets/operations for cost control and defense in depth.

Remediation

CLI

aws cloudtrail put-event-selectors --trail-name <example_resource_name> --event-selectors '[{"ReadWriteType":"WriteOnly","DataResources":[{"Type":"AWS::S3::Object","Values":["arn:aws:s3"]}]}]'

Native IaC
Terraform
Other
  1. In the AWS Console, open CloudTrail and go to Trails
  2. Select <your trail> and click Edit under Data events
  3. For Data event source, choose S3
  4. Select All current and future S3 buckets
  5. Check Write events (or All events)
  6. Click Save changes

Source Code

Resource Type

AwsCloudTrailTrail

References