π AWS S3 Bucket is not configured to block public access π’
- Contextual name: π Bucket is not configured to block public access π’
- ID:
/ce/ca/aws/s3/bucket-block-public-access
- Located in: π AWS S3
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- AWS Security Hub
- [[S3.1] S3 general purpose buckets should have block public access settings enabled]([S3.1] S3 general purpose buckets should have block public access settings enabled (https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html#s3-1)]
- Cloud Conformity
- Internal
dec-x-ec547a7c
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-ec547a7c | 1 |
Logicβ
- π§ prod.logic.yaml π’
- π AWS S3 Bucket
- π AWS S3 Bucket - object.extracts.yaml
- π§ͺ test-data.json
Descriptionβ
Descriptionβ
Amazon S3 provides
Block public access (bucket settings)
andBlock public access (account settings)
to help you manage public access to Amazon S3 resources. By default, S3 buckets and objects are created with public access disabled. However, an IAM principal with sufficient S3 permissions can enable public access at the bucket and/or object level. While enabled,Block public access (bucket settings)
prevents an individual bucket, and its contained objects, from becoming publicly accessible. Similarly,Block public access (account settings)
prevents all buckets, and contained objects, from becoming publicly accessible across the entire account.Rationaleβ
Amazon S3
Block public access (bucket settings)
prevents the accidental or malicious public exposure of data contained within the respective bucket(s).Amazon S3
Block public access (account settings)
prevents the accidental or malicious public exposure of data contained within all buckets of the respective AWS account.Whether blocking public access to all or some buckets is an organizational decision that should be based on data sensitivity, least privilege, and use case.
... see more
Remediationβ
Remediationβ
If utilizing Block Public Access (bucket settings)β
Using AWS CloudFormationβ
- CloudFormation template (YAML):
AWSTemplateFormatVersion: '2010-09-09'
Description: Enables block public access settings on an existing S3 bucket.
Parameters:
BucketName:
Type: String
Description: Name of the existing S3 bucket
Resources:
BlockPublicAccess:
Type: AWS::S3::Bucket
Properties:
BucketName: !Ref BucketName
PublicAccessBlockConfiguration:
BlockPublicAcls: true
IgnorePublicAcls: true
BlockPublicPolicy: true
RestrictPublicBuckets: trueFrom Consoleβ
- Login to AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/.
- Select the Check box next to the Bucket.
- Click on
Edit public access settings
.- Click
Block all public access
.- Repeat for all the buckets in your AWS account that contain sensitive data.
From Command Lineβ
- List all of the S3 Buckets:
aws s3 ls
- Set the Block Public Access to true on that bucket:
... see more