AWS allows bucket owners to set visibility for a bucket to become accessible over the Internet. Any Internet based user, regardless of their authentication status with AWS can make HTTP requests and access the bucket and the objects via a browser.
This allows for an Internet located attacker to access the bucket using a user agent or using the AWS CLI as well. In case there is some sensitive or critical data within the publicly accessible bucket, it will become available to the attackers as well without any authentication requirement. Based on the quantity and type of data uncovered, it may be possible for Internet located attackers to perform additional attacks within the AWS target environment.
Log in to your AWS account and navigate to S3 dashboard.
Click on Buckets on the left navigation panel
Select the bucket to modify.
Click on Permissions tab
Click on Edit under Block public access (bucket settings)
Check the checkbox Block all public access
Click on Save changes
Type confirm for confirming the access permissions and then click on confirm button