S3 bucket open to the public
An S3 bucket without a full Public Access Block can be exposed to the internet by a single policy or ACL — often by accident. Public buckets are indexed and scraped constantly.
Why it matters
Misconfigured S3 buckets are behind a long list of well-known data leaks: backups, logs, customer records and credentials left readable by anyone with the URL.
Because access can be granted by a bucket policy, an object ACL, or an account setting, it's easy to make a bucket public without meaning to — and hard to notice.
How to check for it
- In the S3 console, the bucket list shows an 'Public' badge on any bucket that allows public access.
- Check the account-level and bucket-level Block Public Access settings — all four should be on unless a bucket is a deliberate public website.
- aws s3api get-public-access-block --bucket <name> and review the four flags.
How to fix it
- Turn on all four Block Public Access settings at the account level, then per bucket for any exception.
- aws s3api put-public-access-block --bucket <name> --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
- For a bucket that must serve public content, front it with CloudFront and keep the bucket itself private (Origin Access Control).
SkyShield checks this automatically
Connect your AWS, Cloudflare, GitHub, GitLab, Hetzner or DigitalOcean account read-only and SkyShield flags this across every account and region, with the fix in plain words — alongside the agent that watches your servers. Start free.
FAQ
- What is S3 Block Public Access?
- An account- and bucket-level setting with four flags that override any policy or ACL that would make objects public. With all four on, a bucket cannot be exposed by accident.