Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

My files in AWS S3 may be open to the public

Short answer

S3 buckets block public access by default, but someone can open them with a policy or file permissions. AWS Block Public Access overrides those and can be turned on for a bucket or the whole account. Before switching it on, check that your site does not rely on public files, then confirm what was exposed.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • A security scanner, customer or researcher told me my bucket is public.
  • My images load for anyone who has the link, including private documents.
  • AWS sent a notice about a public bucket.
  • A developer made it public to get things working and never changed it back.
  • I do not know what is inside the bucket.

Why does this happen?

  1. Public access was granted on purpose, then forgotten

    AWS states that new buckets and objects do not allow public access by default, but users can change bucket policies, access point policies or object permissions to allow it. A quick fix during development often stays.

  2. Public means more than one setting

    S3 treats a bucket as public through permission lists (ACLs), bucket policies or both. Closing one leaves the other open. A policy that names everyone as a principal counts as public.

  3. Block Public Access was never turned on

    S3 Block Public Access has four settings and works at account and bucket level. AWS recommends turning all four on for the account, and that the settings override public policies and permissions.

  4. A website needed public files

    Some sites serve images or a static website straight from S3. AWS notes you should check applications still work without public access, and can set individual settings if you need some public use.

  5. Turning it off again reopens it

    AWS says Block Public Access does not alter existing policies or permissions, so removing the block makes a bucket with a public policy public again. The old public setting still has to be cleaned up.

What can I do about it today?

  1. Find out what is in the bucketAsk the person who set it up for a description: customer documents, invoices, product photos or backups. Write it down, because it decides how serious this is.
  2. Check whether your site needs it publicIf your website or app loads images straight from this bucket, switching everything off at once will break pages. Ask first.
  3. Turn on Block Public Access for private bucketsIn the S3 console, open the bucket's permissions and enable Block Public Access. If the bucket should be fully private, this is the quickest safe step.
  4. Do not delete files or the bucketDeleting removes the proof of what was exposed and can break your site. Closing access is enough for now.
  5. Save the access logs if any existIf logging was on, copy those logs. They show whether anyone outside your team downloaded files.
  6. Tell whoever handles privacy for the businessIf personal data was in the bucket, someone responsible for legal obligations needs to decide what to do. I cannot give legal advice.

When should I bring someone in?

  • The bucket held customer or staff personal data.
  • Your site depends on public files and you cannot tell which.
  • You are not sure whether access was used by outsiders.

How do I handle it?

  1. Classify what is storedI sort objects into must-be-public, private and unknown, with the owner of each group.
  2. Close access in the right orderAccount-level Block Public Access, then bucket policy and permission lists, then a check from a logged-out browser.
  3. Keep the site workingPublic images move behind a content delivery setup or signed links so the site loads without an open bucket.
  4. Check the logsI look for downloads from unfamiliar addresses, as far as logs exist, and write down what I find and what I cannot tell.
  5. Add a guardrailBlock Public Access stays on at account level, with an alert if a setting changes.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Can I just make it private?

Yes, if nothing depends on public files. If something does, move that to a safer route first or the site will show broken images.

Does AWS Block Public Access delete my bad policy?

No. AWS says it does not change existing policies and permission lists. It blocks public use of them, and removing the block exposes the bucket again.

How do I know who downloaded files?

Only if logging was switched on beforehand. If it was not, nobody can reconstruct it, and I will tell you so plainly.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

For your developer: the technical fixes

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.