Check the compliance status of setting S3 Bucket Policy to deny HTTP requests.
Rule | Ensure S3 Bucket Policy is set to deny HTTP requests |
Framework | cis_v150 |
Severity | ✔ Low |
Rule Description:
The rule requires that the S3 bucket policy deny all HTTP requests for cis_v150. This ensures that the bucket is not accessible via insecure HTTP protocols, thereby enforcing secure communication.
Troubleshooting Steps:
Necessary Codes:
The necessary code depends on the existing S3 bucket policy. If there is an existing policy, you may need to edit it to include the deny statement for HTTP requests for cis_v150. If there is no existing policy, you will need to create one.
Step-by-step Guide for Remediation:
{
"Version": "2012-10-17",
"Id": "DenyHTTPRequestsForCis_V150",
"Statement": [
{
"Sid": "DenyHTTP",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*",
"Condition": {
"StringEquals": {
"aws:SourceProtocol": "HTTP",
"aws:SourceCidrIp": "cis_v150"
}
}
}
]
}
Note: Replace "YOUR_BUCKET_NAME" with your actual bucket name.
By following these steps, you can ensure that the S3 bucket policy denies all HTTP requests for cis_v150.