AWS security · Plain-English guide

AWS S3 Bucket Exposure Breach: How Buckets Go Public and How to Close Them

An aws s3 bucket exposure breach is usually not a break-in. It is a bucket that was left open — a public access control list, a loose bucket policy, or a leaked credential — so that anyone on the internet could read files that were meant for a handful of people. The fix is rarely complicated. The hard part is noticing the bucket is open before someone else does.

Before you use an S3 bucket: the pre-use checklist

Run through this list every time a bucket is created or its purpose changes. It takes minutes, and it catches the exact mistakes behind most exposure incidents.

  • 1. Block Public Access is on — at the account level, not just the bucket.

    Account-level settings override bucket-level ones when they are stricter. Switch all four settings on for the account first, then confirm them on the bucket itself.

  • 2. No bucket policy grants access to everyone.

    Read the policy line by line. Any statement with an Effect of Allow and a Principal of "*" — or {"AWS": "*"} — without a restricting condition is a public grant, whatever the rest of the policy says.

  • 3. No ACL grants access to the Everyone or Authenticated Users groups.

    Those two groups are the old way buckets went public. Everyone means literally anyone; Authenticated Users means anyone with any AWS account. Neither belongs on a private bucket.

  • 4. Object Ownership is set to bucket owner enforced.

    This disables ACLs entirely, so a public ACL pasted later by an application or a tutorial simply cannot take effect.

  • 5. Only the people and roles that need it can list the bucket.

    Reading objects and listing a bucket are different permissions. A role that needs one file should not be able to enumerate everything the bucket holds.

  • 6. Access logging and CloudTrail are switched on.

    If the bucket is ever exposed, the logs are how you find out what was taken. Without them, you are guessing about scope.

  • 7. Encryption is on, and keys are not in the bucket.

    Default encryption protects stored objects, but it is not a substitute for access control. And an access key stored inside the bucket it protects is a key handed to anyone who reads the bucket.

  • 8. The bucket has an owner, a purpose, and a review date.

    Ownerless buckets drift. Write down who is responsible, what the bucket is for, and when its permissions get reviewed next — then actually review them.

How a bucket actually gets exposed

Amazon Simple Storage Service — S3 — is object storage: you create a bucket, put files in it, and control who can read, write, or list them. The service itself is straightforward. Exposure comes from the layers around it, and there are only a few ways it happens. Knowing each one makes the checklist above make sense, because every item on it maps to one of these routes.

A public ACL, applied once and forgotten

Access control lists are the oldest way to grant access in S3, and the most accident-prone. A single object or bucket granted public-read — often because an upload tool applied it by default, or because a tutorial said to — makes that content readable by anyone with the URL. Buckets created since April 2023 have ACLs disabled by default, when we checked on 1 Dec 2026, but older buckets and buckets where ACLs were deliberately re-enabled can still carry public grants. The dangerous part is that an ACL lives on the object, so a bucket can look private in its policy while individual files inside it are public.

A bucket policy that is wider than intended

Bucket policies are JSON documents attached to the bucket, and they are easy to get wrong. A policy written to let a specific application read files can end up allowing anonymous reads if the principal is set to "*" and the condition that was supposed to limit it is missing or mistyped. Policies copied from examples are a frequent source: the example was written for public website hosting, the copy was pasted into a bucket holding private data, and nobody read the result. Unlike an ACL, a policy applies to the whole bucket, so one mistake exposes everything in it at once.

Block Public Access switched off to make something work

Block Public Access is four settings that stop public ACLs and public policies from taking effect. They are on by default for new buckets, and AWS recommends keeping them on unless a specific use case requires otherwise. The usual story is that someone switches them off to get a website or a download working, intending to switch them back on — and then does not. From that moment, every public ACL and policy in the bucket works as written. The setting is a safety net, and the exposure happens when the net is removed for convenience and left down.

Leaked credentials with too much power

Not every exposure is a setting at all. Sometimes the bucket is correctly private, but the keys that can read it are not. Access keys committed to a code repository, pasted into a support ticket, or left in a file inside another bucket give an attacker legitimate access to the data. Where the keys belong to a role with broad S3 permissions — read access to every bucket, not just one — a single leaked key opens the whole account. The fix here is identity hygiene: short-lived credentials issued to roles instead of permanent keys, least-privilege permissions scoped to named buckets, and rotation the moment a key is suspected of exposure.

Static website hosting and the public prefix

S3 can host a static website, which genuinely needs public reads — but only for the website's files. The safe pattern is to keep public content under one prefix, such as public/, and grant anonymous reads to that prefix only, never to the whole bucket and never with ListBucket. The unsafe pattern is to make the entire bucket public because the website lives in it. Anything else stored in the same bucket — backups, uploads, drafts — becomes public too, and it stays public until someone notices.

The pattern across all five routes: exposure is almost always a deliberate action taken for a reasonable short-term reason — a demo, a download, a test — that was never undone. The bucket did not fail. The follow-through did.

What leaks, and what it costs

What an exposed bucket costs depends entirely on what was in it. A bucket of public website images costs embarrassment. A bucket of customer records, backups, or internal documents costs far more: the data itself, the notifications owed to the people in it, the regulatory questions that follow, and the trust that takes years to rebuild. Buckets often hold more than their owners remember — old backups, database dumps, exported spreadsheets — because storage is cheap and nobody cleans it out. That is why the exposure of a bucket nobody has thought about in a year can still be serious.

There is a second cost that surprises people: access keys found inside an exposed bucket. A key with write or compute permissions can be used to run resources in your account, and the bill for that arrives separately from the breach itself. This is why the first response to an exposure includes revoking keys, not just closing the bucket — the data may have been copied, and the keys may already be in use.

Regulators treat exposure as a failure of controls, not bad luck. Depending on the data and the jurisdiction, a public bucket can mean breach notifications, fines, and contract consequences, even if no one can prove the data was actually downloaded. The absence of access logs makes that worse, not better: without logs, you cannot show that nothing was taken, so you must assume the worst.

If you find your bucket was public: close it first, revoke keys second, investigate third. Turn Block Public Access on at the account and bucket level, remove the public policy or ACL, and rotate any credentials that could have been exposed. Then use the access logs to establish what was downloaded, when, and from where — and keep that record, because it is what your notifications and any regulator will ask for.

Fixes that hold

The durable fixes are structural, not heroic. Set Block Public Access at the account level so no single bucket can go public by itself. Serve public content through CloudFront with Origin Access Control, so only the distribution can read the bucket and the bucket itself stays fully private. Use signed URLs for time-limited sharing instead of public links. Scan bucket policies and ACLs continuously — AWS Config, Security Hub, and posture tools all flag public buckets — and route every finding to a named owner. And review buckets on a schedule: the bucket that was safe when it was created is not automatically safe a year later, after three teams and two migrations have touched it.

For individuals, the connection to this topic is indirect but practical. You cannot audit a company's S3 buckets, but you can limit what their exposure costs you. Use a different password for each service, switch on app-based two-factor authentication on your important accounts, and be careful which inbox you hand to services you do not fully trust. A disposable address from TempoMailUSA for low-trust signups means that if that service's data ends up in an exposed bucket, the address that leaks is not the one tied to your bank and your main accounts. It does nothing to close the bucket — that is the owner's job — but it shrinks what the leak can do to you.

Frequently asked questions

How do I know if my S3 bucket is public?

Check three places: the Block Public Access settings at both the account and bucket level, the bucket policy for any statement allowing Principal "*" without a restricting condition, and the ACL for grants to the Everyone or Authenticated Users groups. The AWS console also shows a public indicator on buckets it considers exposed, and the get-bucket-policy-status call reports whether the policy is public.

Are new S3 buckets public by default?

No. Buckets created since April 2023 ship with all four Block Public Access settings enabled and ACLs disabled through Object Ownership set to bucket owner enforced. A new bucket starts private. Exposure happens later, when someone changes the settings, adds a public policy, or applies a public ACL to serve content.

What should I do first if an S3 bucket was exposed?

Turn Block Public Access back on at the account and bucket level, remove the public policy or ACL that caused the exposure, and revoke any access keys that could have been taken from the bucket. Then use the access logs to work out what was downloaded, over what period, and by whom, before deciding who needs to be notified.

How do I share files from S3 without making the bucket public?

Keep the bucket private and hand out access another way: signed URLs that expire after a set time, or a CloudFront distribution in front of the bucket so only the distribution can read from it. Both approaches let people fetch the files they need while the bucket itself stays closed to the internet.

Keep your real inbox out of the next exposure

Buckets are closed by their owners. Your inbox is protected by you — use a disposable address from TempoMailUSA for signups you do not fully trust.

Get a free temporary inbox