This rule ensures enabling Object-level logging for read events in S3 bucket.
Rule | Ensure that Object-level logging for read events is enabled for S3 bucket |
Framework | cis_v150 |
Severity | ✔ Critical |
Rule Description
The rule ensures that Object-level logging for read events is enabled for the specified S3 bucket, following the CIS AWS Foundations Benchmark version 1.5.0.
Rule Details
The Object-level logging for read events ensures detailed monitoring and auditing of read activities on objects within an S3 bucket. By enabling this feature, the bucket owner can track who accessed the objects, the timing of accesses, and the source of the access.
Troubleshooting Steps
cis_v150
).Remediation Steps
To enable Object-level logging for read events for the specified S3 bucket, follow the steps below:
AWS Management Console:
cis_v150
).AWS CLI:
aws s3api put-bucket-logging --bucket cis_v150 --bucket-logging-status '{"LoggingEnabled": {"TargetBucket": "arn:aws:s3:::target-bucket", "TargetPrefix": "logs/"}}'
Replace
cis_v150
with the name of the S3 bucket and arn:aws:s3:::target-bucket
with the ARN of the bucket where the access logs should be stored. Additionally, "logs/"
can be replaced with the desired prefix for the access log objects.Verification
To verify if Object-level logging for read events is enabled for the S3 bucket (
cis_v150
):AWS Management Console:
cis_v150
).AWS CLI:
aws s3api get-bucket-logging --bucket cis_v150
Validate that the response reflects the enabled status and the correct target bucket and prefix configuration.
If the verification steps indicate successful configuration, the Object-level logging for read events is enabled for the specified S3 bucket, ensuring compliance with the CIS AWS Foundations Benchmark version 1.5.0.