Description
S3 server access logs record requests to the bucket holding CloudTrail files. The trail’s event selectors control which AWS events go into those files.
Potential impact
Missing bucket access records can make it harder to investigate who requested an audit log or why access failed.
Remediation
Set LoggingConfiguration on the CloudTrail storage bucket. Choose a separate destination in the same account and Region, allow S3 log delivery and set access and retention. Make a request to the source bucket and check the destination for a server access record. Delivery can be delayed or incomplete.
Examples
Supply the destination name in AccessLogBucketName. The trail, its event selectors and its S3 delivery policy are configured separately.
Before
Resources:
MyBucket:
Type: AWS::S3::Bucket
Properties:
VersioningConfiguration:
Status: Enabled
After
Resources:
MyBucket:
Type: AWS::S3::Bucket
Properties:
VersioningConfiguration:
Status: Enabled
LoggingConfiguration:
DestinationBucketName: !Ref AccessLogBucketName
LogFilePrefix: loga/
Both examples enable versioning. The second sends server access logs under loga/.