For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/default_rules/748-vvi-4ye.md. A documentation index is available at /llms.txt.

S3 bucket access logging should be enabled on the CloudTrail S3 bucket

Description

AWS S3 buckets used as CloudTrail log destinations should have server access logging enabled with a target bucket configured for log delivery. Server access logs record each request made to the bucket, including request type, resources accessed, and request time, which supports security monitoring and incident response for the CloudTrail log store. This rule evaluates only buckets referenced by a CloudTrail trail and fails when no logging target bucket is configured.

Remediation

  1. Identify the CloudTrail bucket with aws cloudtrail describe-trails --query 'trailList[*].S3BucketName'.
  2. In the Amazon S3 console, open the bucket’s Properties, edit Server access logging, enable it, and select a target bucket and prefix. Alternatively, apply a logging configuration with aws s3api put-bucket-logging --bucket <bucket-name> --bucket-logging-status file://<file>.json, as described in Enabling Amazon S3 server access logging.

References