# 2.1.1 Ensure S3 Bucket Policy is set to deny HTTP requests (Automated)

- Source: https://support.icompaas.com/support/solutions/articles/62000234220-2-1-1-ensure-s3-bucket-policy-is-set-to-deny-http-requests-automated-
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Amazon Web Services Foundations Benchmark v5.0.0](https://support.icompaas.com/support/solutions/62000112684) › [CIS AWS Benchmarks](https://support.icompaas.com/support/solutions/folders/62000169233)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

#### Profile Applicability

-   **Level 1**

#### Description:

S3 Bucket Policies can be configured to ensure that data is only accessible through secure communication channels. One such configuration is to deny all HTTP requests, allowing only HTTPS (secure HTTP) requests to access the S3 bucket. This is critical for ensuring the confidentiality and integrity of data during transmission by enforcing the use of encrypted communication.

By setting the S3 bucket policy to deny HTTP requests, you ensure that all data transmitted to and from the bucket is encrypted using SSL/TLS, reducing the risk of data interception and man-in-the-middle attacks.

#### Rationale:

Denying HTTP requests and allowing only HTTPS provides the following benefits:

-   Security: Prevents the transmission of data over unencrypted HTTP, ensuring that all data access is encrypted using HTTPS.  
    
-   Compliance: Meets security and regulatory standards (e.g., HIPAA, PCI-DSS) that require encryption of data in transit.  
    
-   Protection against interception: Reduces the risk of data being exposed to unauthorized parties during transmission.  
    

Without this policy, data sent via HTTP is transmitted in plaintext and can be intercepted, increasing the risk of unauthorized access and data breaches.

#### Impact:

Failure to configure the S3 Bucket Policy to deny HTTP requests can result in:

-   Data exposure: Sensitive data transmitted over HTTP can be intercepted by attackers.  
    
-   Non-compliance with security standards that mandate encryption of data in transit.  
    
-   Security vulnerabilities: Allowing HTTP requests can lead to man-in-the-middle attacks, compromising data integrity and confidentiality.  
    

By denying HTTP requests, you ensure that only secure, encrypted connections are used to interact with your S3 bucket.

#### Default Value:

By default, S3 buckets do not have a policy to block HTTP requests. You must explicitly configure the bucket policy to deny HTTP requests and enforce the use of HTTPS.

#### Pre-Requisites:

-   AWS CLI installed and configured  
    
-   IAM permissions:  
    
    -   s3:PutBucketPolicy  
        
    -   s3:GetBucketPolicy  
        
-   S3 bucket should be available for policy configuration  
    

#### Remediation:

##### Test Plan:

Using AWS Console:

1.  Go to the [S3 Console](https://console.aws.amazon.com/s3/).  
    
2.  Select the S3 bucket you want to configure and go to the Permissions tab.
    
3.  Under Bucket Policy, check the existing policy to ensure it denies HTTP requests and only allows HTTPS. If the policy is not set, configure it as described below.  
    
4.  Verify that the policy is correctly applied to block HTTP requests.  
    

Using AWS CLI:

aws s3api get-bucket-policy --bucket <bucket-name> --query "Policy" --output text

  

##### Implementation Plan:

Using AWS Console:

1.  Create or update the S3 bucket policy to deny HTTP requests:  
    
    -   Go to the [S3 Console](https://console.aws.amazon.com/s3/).  
        
    -   Select the S3 bucket and navigate to the Permissions tab.  
        
    -   Under Bucket Policy, enter the following policy to deny HTTP requests:  
        

{

  "Version": "2012-10-17",

  "Statement": \[

    {

      "Sid": "DenyHTTPRequests",

      "Effect": "Deny",

      "Principal": "\*",

      "Action": "s3:GetObject",

      "Resource": "arn:aws:s3:::<bucket-name>/\*",

      "Condition": {

        "Bool": {

          "aws:SecureTransport": "false"

        }

      }

    }

  \]

}

2.   Replace <bucket-name> with the actual bucket name. This policy denies all HTTP requests and allows only HTTPS requests.
    
3.  Verify the policy:  
    
    -   In the Permissions tab, confirm that the bucket policy has been correctly applied and that it denies HTTP requests.
        

Using AWS CLI:

1.  Apply the policy to deny HTTP requests:  
    

aws s3api put-bucket-policy --bucket <bucket-name> --policy '{

  "Version": "2012-10-17",

  "Statement": \[

    {

      "Sid": "DenyHTTPRequests",

      "Effect": "Deny",

      "Principal": "\*",

      "Action": "s3:GetObject",

      "Resource": "arn:aws:s3:::<bucket-name>/\*",

      "Condition": {

        "Bool": {

          "aws:SecureTransport": "false"

        }

      }

    }

  \]

}'

2.  Verify the bucket policy:  
    

aws s3api get-bucket-policy --bucket <bucket-name> --query "Policy" --output text

#### Backout Plan:

Using AWS Console:

1.  If the bucket policy causes access issues:  
    
    -   Go to the [S3 Console](https://console.aws.amazon.com/s3/).  
        
    -   Modify the Bucket Policy to allow HTTP requests or remove the HTTPS-only policy.
        
    -   Save the changes to allow access via HTTP if needed for certain use cases.  
        
2.  Modify bucket settings to allow both HTTP and HTTPS or adjust the access control as necessary.
    

Using AWS CLI:

1.  Temporarily disable the policy blocking HTTP requests:  
    

aws s3api put-bucket-policy --bucket <bucket-name> --policy '{}'

2.  Re-enable the policy once issues are resolved:  
    

aws s3api put-bucket-policy --bucket <bucket-name> --policy '{

  "Version": "2012-10-17",

  "Statement": \[

    {

      "Sid": "DenyHTTPRequests",

      "Effect": "Deny",

      "Principal": "\*",

      "Action": "s3:GetObject",

      "Resource": "arn:aws:s3:::<bucket-name>/\*",

      "Condition": {

        "Bool": {

          "aws:SecureTransport": "false"

        }

      }

    }

  \]

}'

#### References:

-   [AWS S3 Documentation  
    ](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)
    
-   [AWS CLI Command Reference for S3  
    ](https://docs.aws.amazon.com/cli/latest/reference/s3api/)
    
-   [AWS Security Best Practices  
    ](https://aws.amazon.com/blogs/security/)
    

#### CIS Controls Mapping:

<table style="border:none;border-collapse:collapse"><tbody><tr style="height:39.25pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">CIS Control Version</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;text-align:justify;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">Control ID</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;text-align:justify;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">Control Description</span></span></span></p></td></tr><tr style="height:39.25pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">CIS v8</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">4.9</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">Perform Continuous Security Monitoring and Incident Detection</span></span></span></p></td></tr><tr style="height:25pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">CIS v7</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">6.3</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">Monitor Security Configurations for Compliance</span></span></span></p></td></tr><tr style="height:39.25pt"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">CIS v7</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">5.2</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;text-align:justify"><span style="font-size:14px"><span style="font-family:&quot;Helvetica Neue&quot;"><span dir="ltr" style="color:rgb(0, 0, 0);font-weight:400">Securely Manage and Monitor Cloud Accounts and Services</span></span></span></p></td></tr></tbody></table>

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
