This rule enforces the enabling of S3 bucket logging for improved security and compliance.
Rule | S3 bucket logging should be enabled |
Framework | GxP 21 CFR Part 11 |
Severity | ✔ Low |
Rule Description:
Enabling S3 bucket logging for GxP 21 CFR Part 11 ensures that all access and activity within the S3 bucket are logged and auditable. This helps organizations comply with the regulatory requirements of GxP (Good Practice) and 21 CFR Part 11, which governs electronic records and electronic signatures.
Troubleshooting Steps:
Necessary Code:
There are no specific codes necessary to enable S3 bucket logging, as it can be configured through the AWS Management Console or command-line interface (CLI).
Step-by-Step Guide for Remediation:
Alternatively, you can use the AWS CLI to enable S3 bucket logging by following these steps:
aws s3api put-bucket-logging --bucket your-bucket-name --bucket-logging-status '{"LoggingEnabled":{"TargetBucket":"your-log-bucket","TargetPrefix":"optional-prefix/"}}'
Replace "your-bucket-name" with the name of your S3 bucket and "your-log-bucket" with the name of the bucket where logs should be saved. If you need to specify a log file prefix, include it after "optional-prefix/".
aws s3api get-bucket-logging --bucket your-bucket-name
Ensure that the "LoggingEnabled" field displays the target bucket and prefix you configured.
By following these steps, you will successfully enable S3 bucket logging for GxP 21 CFR Part 11 compliance. Remember to regularly review and analyze the generated logs to ensure compliance and security of your S3 bucket.