This rule ensures proper configuration of S3 Buckets to block public access for better security measures.
Rule | Ensure that S3 Buckets are configured with 'Block public access (bucket settings)' |
Framework | cis_v150 |
Severity | ✔ Critical |
Rule Description:
The rule "cis_v150" ensures that S3 buckets in your AWS account are properly configured with "Block public access (bucket settings)" enabled. This setting helps to prevent unintentional public exposure of your S3 data and enforces better security practices.
Enabling "Block public access" ensures that only authorized users or resources can access the S3 buckets, increasing the confidentiality and privacy of your data.
Troubleshooting Steps:
Necessary Code:
No code is required for this rule. The configuration settings can be updated through the AWS Management Console, AWS CLI, or AWS SDKs.
Step-by-step Guide:
Please follow the steps below to ensure compliance with the "cis_v150" rule:
AWS Management Console:
AWS CLI:
Open the command-line interface (CLI).
Execute the following command to enable "Block public access" on the bucket:
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 actual name of the bucket.AWS SDKs:
PutPublicAccessBlock
in the AWS SDK for Python (Boto3).After performing these steps, the S3 bucket will be compliant with the "cis_v150" rule, ensuring that public access to the bucket is blocked and improving the overall security posture of your AWS account.