Overview
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.
Rationale
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 guidance
Perform the following to enable S3 bucket logging:
Via the Management Console
- Sign in to the AWS Management Console and open the S3 console at https://console.aws.amazon.com/s3.
- Under
All Bucketsclick on the target S3 bucket - Click on
Propertiesin the top right of the console - Under
Bucket: <s3_bucket_for_cloudtrail> click onLogging - Configure bucket logging
- Click on
Enabledcheckbox - Select Target Bucket from list
- Enter a Target Prefix
- Click
Save
**Default Value: **
Logging is disabled.
References
- CCE-78918-0
- CIS CSC v6.0 #14.6
Service-wide remediation
Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.
AWS
Use AWS Organizations guardrails, AWS Config rules or conformance packs where they fit, approved account baselines, and IaC modules so new resources inherit the secure setting.
Operational rollout
- Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
- Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
- Re-scan and track approved exceptions with an owner and expiry date.
Query logic
These are the stored checks tied to this control.
S3 bucket access logging is enabled on the CloudTrail S3 bucket
Connectors
Covered asset types
Expected check: eq []
{buckets(where:{trails_NOT: null, loggingEnabled:false}){...AssetFragment}}
AWS