Control: 2.6 Ensure S3 bucket access logging is enabled on the CloudTrail S3 bucket
Description
S3 Bucket Access Logging generates a log that contains access records for each request made to your S3 bucket. An access log record contains details about the request, such as the request type, the resources specified in the request worked, and the time and date the request was processed. It is recommended that bucket access logging be enabled on the CloudTrail S3 bucket.
By enabling S3 bucket logging on target S3 buckets, it is possible to capture all events which may affect objects within an target buckets. Configuring logs to be placed in a separate bucket allows access to log information which can be useful in security and incident response workflows.
Remediation
Perform the following to enable S3 bucket logging:
Via the Management Console
- Sign in to the AWS Management Console and open the S3 console.
- Under
All Buckets
click on the target S3 bucket. - Click on
Properties
in the top right of the console. - Under
Bucket
:<s3_bucket_for_cloudtrail>
click onLogging
. - Configure bucket logging
- Click on
Enabled
checkbox. - Select Target Bucket from list.
- Enter a Target Prefix.
- Click
Save
.
Default Value: Logging is disabled.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.cis_v120_2_6
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.cis_v120_2_6 --share
SQL
This control uses a named query:
cloudtrail_s3_logging_enabled