Ensure S3 buckets are not publicly accessible
Description
S3 buckets should block all public access through bucket policies and ACLs.
⚠️ Risk Impact
Publicly accessible S3 buckets are the #1 cause of cloud data breaches. Sensitive data (PII, credentials) can be discovered and exfiltrated.
🔍 How EchelonGraph Detects This
EchelonGraph's Tier 1 Cloud Scanner automatically checks for this condition across all connected AWS accounts. Violations are flagged as critical-severity findings with remediation guidance.
🔧 Remediation
Enable S3 Block Public Access at the account level: aws s3control put-public-access-block --account-id ACCOUNT_ID --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
💀 Real-World Attack Scenario
Capital One 2019: A misconfigured WAF allowed an attacker to access the EC2 metadata service and obtain IAM role credentials. The role had access to an S3 bucket containing 100M credit card applications. The bucket had no Block Public Access enabled, allowing the exfiltrated credentials to read all 700+ buckets.
💰 Cost of Non-Compliance
Capital One: $80M OCC fine + $190M customer settlement. Twitch 2021: public S3 bucket led to entire source code leak. Average S3 breach cost: $4.45M. GDPR fines for public storage: up to €20M.
📋 Audit Questions
- 1.Is S3 Block Public Access enabled at the account level?
- 2.Which buckets have public ACLs or bucket policies?
- 3.Do you use AWS Config rules to detect public buckets?
- 4.What data classification exists for each S3 bucket?
🎯 MITRE ATT&CK Mapping
🏗️ Infrastructure as Code Fix
resource "aws_s3_account_public_access_block" "block" {
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}⚡ Common Pitfalls
- ⛔Enabling Block Public Access per-bucket but not at the account level
- ⛔Using ACLs instead of bucket policies (ACLs are legacy and harder to audit)
- ⛔Not scanning for buckets in regions you don't typically use
📈 Business Value
Account-level S3 Block Public Access is the most effective defense against cloud data breaches. It prevents any bucket from being made public regardless of individual bucket settings.
⏱️ Effort Estimate
1 hour to enable account-level block + audit existing buckets
EchelonGraph detects public S3 buckets across all accounts and regions in <60 seconds
🔗 Cross-Framework References
Automate CIS AWS 2.1 compliance
EchelonGraph continuously monitors this control across all your cloud accounts.
Start Free →