AWS Security: The Basics With Buckets

By Red Siege | November 6, 2025

by Ian Briley

Introduction to buckets:

Hello and welcome to the first blog in my series about AWS and being secure while in the cloud. In this blog post we’re specifically going to cover some basic AWS S3 security knowledge, and a scenario I’ve seen in the wild a few times!

One of the most common themes with AWS cloud security is that Amazon is responsible for the security of the cloud, however you are responsible for security while in the cloud. One of the larger threats to AWS cloud security is misconfigured or mismanaged S3 Buckets and the processes that use them.

What is AWS S3?

AWS Simple Storage Service (S3) is a service, you can probably guess, that allows you to store pieces of data you own (objects) on the AWS Cloud in a repository (a bucket). S3 provides objects with 99.99999999999% reliability (yes that is 11 nines), backup and archival processes, multiple means of secure methods of encryption, and extremely granular means of addressing who has access to what.

There are several AWS products that fall under S3 such as Amazon Glacier, EFS, FSx, and much more! With this blog post we’re going to keep things simple and just focus on a standard run-of-the-mill AWS S3 Bucket.

This bucket is too open, this bucket is too closed, this bucket…

There are three ways a bucket can be set up: bucket is private, bucket is public, and the bucket is private, but objects can be made public, as shown in the image below. (This is “technically” not true, there are so many ways to set up a bucket with ACLs/policies, IAM Roles, etc., but we’re going to keep things simple for the time being and avoid really getting lost in the weeds.)

One of the standard rules of S3 Buckets is “do not make your buckets public.” AWS via the web interface makes it painful to make a private bucket public. Buckets out of the box have block all public access enabled. The easiest way to make a bucket public is to uncheck all of the block public access boxes as shown below.

Then you need to enable the use of the access control list for the bucket, add the read permissions to the bucket ACL, for the everyone group and then ignore the two warnings, and check a box stating you understand you’re making this bucket and any object in the bucket public. Amazon really doesn’t want you to make buckets public. For good reason too.

The kicker…

You can follow the same steps from earlier but never assign the read permission to the everyone group for the Bucket ACL. What this allows is for individual objects to be publicly accessible, and anything not manually assigned this permission is made private. You accomplish this is by clicking the individual file, going to the permissions tab and assigning read in the everyone group as shown in the screenshots below.

Amazon will say “hey this might not be a good idea”, but you can click the “I understand the effects of the changes on the object” and now your individual object is free to be accessed by the world!

This type of set up (and obviously the public bucket configuration) can cause some issues, but you might have a well-intentioned need for this bucket setup.

The Scenario

So obviously the issue at hand with a “everything is public” bucket is if sensitive objects are erroneously placed there, they can be accessed by everyone. The inverse is it might be too complicated, time consuming, or the digital landscape shifts too often to really make useful and nuanced Bucket policies to grant permissions to a private bucket and its objects. This is where people might resort to this hybrid approach to buckets.

I’ve seen people keep certain files private or only accessible via a set of policy controls but want to make it easy to get a handful of objects to the public, while keeping all related objects and their processes to a singular bucket.

You might see this with a report that’s meant to be consumed by the general public. You could store the versions, supporting data, etc., up to the final version of the report, make those objects private, but the finished product could be made to be accessible anywhere.

This is where our scenario I mentioned earlier comes in. You might have noticed that via the web console Amazon makes it incredibly tedious to make buckets and objects in buckets accessible anywhere on the web. Let’s say instead of a few files you need to upload, you have thousands of objects, some do need to be public while others need to stay private. This has become a full-time soul crushing job. Well here comes the enemy of security, automation in pursuit of usability.

Amazon has provided a ton of different ways to interact with their products, AWS CLI, AWS API Gateway, Python Libraries, Java Libraries, etc.

It’s “easy” to build secure process in a snapshot of time. What makes securing a process hard, is that time waits for no one. Your secure process will remain the same while the organization changes, supporting processes change, personnel changes, etc. Let’s look at some code that demonstrates this.

The Code

Here I’m using Boto3 to demonstrate the dangerous S3 upload logic. We made redsiege-bucket-a the private only bucket, and redsiege-bucket-b as our hybrid bucket where objects in that bucket can be made public. This code was written with the assumption that files located in the directory are assumed to be made public.

As you can see our bucket ALC for redsiege-bucket-a won’t allow the files to be uploaded and made public. It gives us a big error stating so as shown in the image below.

 

If we change our target bucket to redsiege-bucket-b and run the code again, you’ll notice two things. The first being we didn’t have any errors with conflicting permissions, and secondly (and most importantly) it assigns all the files with “public-read”, but we did not have to manually acknowledge each individual file is being made public.

This is why it’s very important to review the processes that handle data in your organization and not just the technology in a vacuum. This all rests on the idea that people will not erroneously start putting data that doesn’t belong in that directory. For this example, I made a file that contained fake credit card numbers and reran the uploader code.


The files upload with no issues as you can see below, and because this was automated nobody had to manually click and enable the public permissions. The manual process, though tedious, could potentially catch the file with credit card numbers being made public as shown below.

The Real World

This is an extreme example, but I’ve seen similar accidental exposures in the wild. In one case, I was working with a real-estate research company that had reports for the general public, and private reports that were meant for their paying clientele.

The client decided to put the finished public products into a specific file directory and have a script upload all the files and make them available for everyone to grab on S3. That’s great, you’re no longer manually doing this day after day saving you hours of work. However, it turned out people started accidentally putting files into that directory (a directory named “finished_reports”) that were never intended to be made public, such as the reports that were created for private real estate research. The company was less than thrilled to find out all their research for paying clients, recommendations, estimates, etc., were easily accessible from the web.

What can we do to catch this?

There’s a bunch of ways to fix this, you could build in some Date Loss Prevention (DLP) functionality into the uploader, restrict who has access to the shared directory, periodically review any buckets that can be public and their contents, review internal processes to make sure department policy and training hasn’t introduced new threats, and much more.

If the datasets in question are limited you might be able to create your own bucket auditing program to fit your needs, and I plan in a future blog post to show case how to do that and build out better bucket policies.

Built In Tools

However, because S3 is intended to be “unlimited” storage it might not be feasible to have a script to parse through petabytes worth of data. Amazon has some auditing tools built into the infrastructure that can do this for you such as Macie. Depending on your needs Macie could be too expensive or it could be a steal.

The nice thing about Macie is it has tons of data detection features built into it and can be specialized for different regions of the world. You can even create your own detections to fit special use cases for data that is uniquely important to your organization.

Additionally, Macie will generate a report for you listing all the issues it found while reviewing your objects and buckets, and you can drill down to the individual finding and review the files in question, which can be a huge time saver for larger organizations and datasets!

Until next time!

Thank you for checking out my quick dive into AWS S3 Buckets. There so much more to AWS and even S3 to explore. My next blog post will cover how to build a quick bucket/object scanner and setting up AWS policies to provide fine-tuned granular access. Future blog posts will cover additional AWS security aspects as well so stay tuned. Stay safe, mess around a little bit and have fun!


About Ian Briley, Security Consultant

Ian Briley has over 10 years of experience in information security consisting of The United States Armed Forces, the Healthcare industry, Security Operation Centers, and Security Consulting. Ian is an experienced presenter, trainer, developer, maker, and researcher. Ian enjoys attending local security focused groups and learning more about cloud-based environments and solutions

Certifications:
CRTO, GWAPT, eJPT, CySA+, SSCP, SEC+

DigDug: Making Your Payload Too Big to Scan

By Red Siege | November 5, 2026

by Jason Downey This is Dig Dug. A Red Siege tool for avoiding av/edr can offer valuable solutions for penetration testers and red teamers. If you spend any amount of […]

Learn More
DigDug: Making Your Payload Too Big to Scan

Trust, But Verify: What Clients Should Know Before a Mobile Application Assessment

By Red Siege | October 5, 2026

by Stuart Rorer Most weeks, the tests I run are fairly routine: web applications, externals, and internals with a tight scope. But mobile application assessments have a way of getting […]

Learn More
Trust, But Verify: What Clients Should Know Before a Mobile Application Assessment

This is not the Access Policy you’re looking for

By Red Siege | October 1, 2026

by Mike Saunders The AWS ReadOnlyAccess policy might be providing more access than you’re intending to grant. On a recent assessment, we observed widespread use of IAM roles with the […]

Learn More
This is not the Access Policy you’re looking for

Find Out What’s Next

Stay in the loop with our upcoming events.