Skip to content

Instantly share code, notes, and snippets.

@terell
Created September 1, 2020 16:53
Show Gist options
  • Save terell/d3ed2db8b0f96f08dbb4cab99a90cc8c to your computer and use it in GitHub Desktop.
Save terell/d3ed2db8b0f96f08dbb4cab99a90cc8c to your computer and use it in GitHub Desktop.
test-cf.yaml
AWSTemplateFormatVersion: 2010-09-09
Description: Configure AWS Config rules to check that your S3 buckets do not allow public access
Parameters:
ConfigRuleName:
Type: 'String'
Description: 'Name for the Config rule'
Resources:
CheckForS3PublicRead:
Type: AWS::Config::ConfigRule
Properties:
ConfigRuleName: !Sub ${ConfigRuleName}
Description: Checks that your S3 buckets do not allow public read access. If an S3 bucket policy or bucket ACL allows public read access, the bucket is noncompliant.
Source:
Owner: AWS
SourceIdentifier: S3_BUCKET_PUBLIC_READ_PROHIBITED
Scope:
ComplianceResourceTypes:
- AWS::S3::Bucket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment