All checks
Critical S3 · account

S3 general purpose buckets should block public write access

Checks whether an S3 general purpose bucket's policy or ACL grants public write access that Block Public Access, on the bucket or the account, does not override. Such a grant lets anyone on the internet upload, overwrite or delete the bucket's objects.

service
S3
severity
Critical
scope
evaluated once per account

How to fix it

  • Can break clients: Once this applies, S3 refuses anonymous reads (such as a static website's), uploads that set a public ACL, and other accounts' access through a public bucket policy.

In the console

S3 → the bucket → Permissions → Block public access (bucket settings)

Block all public access
Selected

With the AWS CLI

aws s3api put-public-access-block --bucket <bucket> --public-access-block-configuration BlockPublicAcls=true,BlockPublicPolicy=true,IgnorePublicAcls=true,RestrictPublicBuckets=true

With Terraform

resource "aws_s3_bucket_public_access_block" "this" {
  bucket                  = aws_s3_bucket.this.id
  block_public_acls       = true
  block_public_policy     = true
  ignore_public_acls      = true
  restrict_public_buckets = true
}

See which of your accounts this check is failing on.

Book a live scan