This rule ensures that S3 bucket logging is properly enabled to enhance security measures.
Rule | S3 bucket logging should be enabled |
Framework | FedRAMP Moderate Revision 4 |
Severity | ✔ Low |
S3 Bucket Logging for FedRAMP Moderate Revision 4
Description
Enabling S3 bucket logging is a required security control for achieving compliance with the FedRAMP (Federal Risk and Authorization Management Program) Moderate security baseline, specifically under Revision 4. This control ensures that logging is enabled for Amazon S3 buckets, allowing for the capture and analysis of access and activity data within the bucket. By implementing bucket logging, organizations can gain better visibility into storage activity, detect and investigate any unauthorized access, and meet the compliance requirements.
Troubleshooting Steps (if applicable)
If you encounter any issues while enabling S3 bucket logging, please follow these troubleshooting steps:
Necessary Codes (if applicable)
No specific code is required for enabling S3 bucket logging. It can be done using the AWS Management Console or the AWS CLI.
Step-by-Step Guide for Enabling S3 Bucket Logging
Using AWS Management Console:
Using AWS CLI:
aws s3api put-bucket-logging --bucket <bucket-name> --bucket-logging-status file://logging-configuration.json
Replace
<bucket-name>
with the actual name of your S3 bucket.
3. Create a JSON file named logging-configuration.json
with the following content:{
"LoggingEnabled": {
"TargetBucket": "<target-bucket-name>",
"TargetPrefix": "<log-file-prefix>"
}
}
Replace
<target-bucket-name>
with the name of the bucket where you want to store the logs and <log-file-prefix>
with the desired prefix for log file names.
4. Run the put-bucket-logging
command to enable bucket logging using the JSON configuration file.Note
Ensure that the S3 bucket logging is regularly monitored and the logs are retained for the required duration as per your organizational policies or regulatory requirements.