How to Block Public Access to an Individual S3 Bucket
Learn how to block public access to S3 buckets in AWS to protect your organization from security risks with this step-by-step guide.
Learn how to block public access to S3 buckets in AWS to protect your organization from security risks with this step-by-step guide.
S3 buckets that are publicly accessible could pose a security risk. To address this, you can restrict access to S3 buckets by either blocking public access at the account-level or at the bucket level.
If you do not have public access blocked at the account level, but want to block public access for a specific S3 bucket, you will need to update the bucket settings.
In this guide, we’ll explain how to block public access from individual S3 buckets to fortify your security.
You can update the access setting for an existing S3 bucket using either the AWS Console or the AWS CLI.
Here’s an example:
You’ll see an output like this:
Now you’ve successfully blocked public access for a specific S3 bucket. If you want to block public access for all S3 buckets, you can edit the access settings at the account-level.
When you are creating a new S3 bucket in the AWS Console, you will see a section called Bucket settings for Block Public Access. You can enable all the settings to block public access, which is recommended unless you are using the bucket to host a public website.
When you use the CLI to create a new S3 bucket, you can ensure that the bucket doesn’t allow for public access by including the --acl flag and specifying private:
By setting the ACL (Access Control List) to private, you are configuring the bucket to not be publicly accessible.
You need to be careful if you have publicly accessible S3 buckets, since it can pose a security risk. You can check individual buckets or alter account settings, but either way, running periodic checks to ensure that you have minimal access settings is a good practice.
With Blink, you can use this pre-built automation in the Blink Library to check for any publicly accessible S3 buckets and send a report with non-compliant buckets via email.
You can also generate an automated workflow for this task by typing a prompt into Blink Copilot.
When you run this automation, it executes the following steps:
If you want to add an approval step to directly make the S3 bucket private, or change the notification step, just change the prompt to describe your needs.
You can try typing your own prompts here with Blink Copilot.
Get started with Blink today and see how easy automation can be.
Blink is secure, decentralized, and cloud-native. Get modern cloud and security operations today.