This rule ensures compliance by blocking S3 public access at bucket levels.
Rule | S3 public access should be blocked at bucket levels |
Framework | FedRAMP Moderate Revision 4 |
Severity | ✔ High |
Rule Description:
This rule aims to ensure that S3 buckets within the AWS account are not publicly accessible at the bucket level, aligning with the requirements of FedRAMP Moderate Revision 4.
Troubleshooting Steps:
If the S3 bucket is found to be publicly accessible at the bucket level, follow the below troubleshooting steps to rectify the issue:
Code:
No specific code is required for this rule. However, you may need to review and modify the bucket policy if it allows public access.
Remediation Steps:
To remediate the issue and block public access at the bucket level, follow these steps:
CLI Command:
If you prefer to use the AWS Command Line Interface (CLI) to remediate the issue, follow these steps:
aws s3api put-bucket-acl --bucket <bucket-name> --acl private
Replace
<bucket-name>
with the name of the bucket that needs to be secured.aws s3api put-public-access-block --bucket <bucket-name> --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
Replace
<bucket-name>
with the name of the bucket that needs to be secured.Note:
Ensure that proper testing and validation are performed after implementing the remediation steps to verify that the bucket is no longer publicly accessible at the bucket level.