Other Articles

S3 Bucket – Block S3 Bucket Public Access

This check ensures that public access is blocked on S3 buckets to prevent unauthorized data exposure.

Check Details

  • Resource: S3 Bucket
  • Check: Block S3 bucket public access
  • Risk: Sensitive data may be exposed to the public

Remediation via AWS Console

  1. Log in to the AWS Management Console and open the Amazon S3 console. Amazon S3 Console
  2. Select the S3 bucket. S3 bucket
  3. Open the Permissions tab. S3 permissions tab
  4. Under Block public access (bucket settings), click Edit. Edit block public access
  5. Enable Block all public access and click Save changes. Enable block public access

Remediation via AWS CLI

  1. Log in to the AWS Management Console and click the CloudShell icon (>_) in the top-right corner. AWS CloudShell
  2. List all S3 buckets:
    
    
    aws s3 ls
    
  3. Enable block public access for a specific bucket:
    
    
    aws s3api put-public-access-block \
     --bucket <bucket-name> \
     --public-access-block-configuration \
     BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true