This rule ensures that S3 buckets do not allow public write access, maintaining data security.
Rule | S3 buckets should prohibit public write access |
Framework | FedRAMP Moderate Revision 4 |
Severity | ✔ High |
Rule Description:
This rule enforces that S3 buckets should not allow public write access in order to comply with the FedRAMP Moderate Revision 4 security requirements. Public write access allows anyone on the internet to modify the contents of the S3 bucket, which can lead to unauthorized access or data breaches.
Troubleshooting Steps:
Necessary Codes:
No specific code is required for this rule. However, you may need to modify the bucket policy or ACL settings if public write access is currently allowed.
Remediation Steps:
Follow these step-by-step instructions to remediate the rule violation:
CLI Command:
If you prefer the command line interface (CLI), you can use the following AWS CLI commands for remediation:
List all S3 buckets:
aws s3 ls
Remove public write access from a bucket policy:
aws s3api put-bucket-policy --bucket <bucket-name> --policy file://bucket-policy.json
Replace
<bucket-name>
with the actual name of the S3 bucket and bucket-policy.json
with the updated bucket policy file that removes public write access.Remove public write access from an ACL:
aws s3api put-bucket-acl --bucket <bucket-name> --acl private
Replace
<bucket-name>
with the actual name of the S3 bucket.Note: Before making any changes through the CLI, make sure you have the necessary permissions and understand the potential impact of your actions.
By following these steps and ensuring that public write access is disabled for your S3 buckets, you will meet the requirements of the FedRAMP Moderate Revision 4 security standards and reduce the risk of unauthorized modifications or data breaches.