Non-compliant CFn
stringclasses
28 values
Fixed CFn
stringclasses
28 values
Check: 1 Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket PublicAccessBlockConfiguration: BlockPublicAcls: false BlockPublicPolicy: false IgnorePublicAcls: false RestrictPublicBuckets: false MyBucketPolicy: Type: 'AWS::S3::BucketPolicy' Properties: Bucket: Ref: 'MyBucket' PolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: '*' Action: 's3:GetObject' Resource: Fn::Join: - '' - - 'arn:aws:s3:::' - Ref: 'MyBucket' - '/*'
Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true MyBucketPolicy: Type: 'AWS::S3::BucketPolicy' Properties: Bucket: Ref: 'MyBucket' PolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: '*' Action: 's3:GetObject' Resource: Fn::Join: - '' - - 'arn:aws:s3:::' - Ref: 'MyBucket' - '/*'
Check: 2 Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket PublicAccessBlockConfiguration: BlockPublicAcls: false BlockPublicPolicy: false IgnorePublicAcls: false RestrictPublicBuckets: false MyBucketPolicy: Type: 'AWS::S3::BucketPolicy' Properties: Bucket: Ref: 'MyBucket' PolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: '*' Action: 's3:GetObject' Resource: Fn::Join: - '' - - 'arn:aws:s3:::' - Ref: 'MyBucket' - '/*'
Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket PublicAccessBlockConfiguration: BlockPublicAcls: false BlockPublicPolicy: false IgnorePublicAcls: false RestrictPublicBuckets: false BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 MyBucketPolicy: Type: 'AWS::S3::BucketPolicy' Properties: Bucket: Ref: 'MyBucket' PolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: '*' Action: 's3:GetObject' Resource: Fn::Join: - '' - - 'arn:aws:s3:::' - Ref: 'MyBucket' - '/*'
Check: 1 Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket MyBucketPolicy: Type: 'AWS::S3::BucketPolicy' Properties: Bucket: Ref: 'MyBucket' PolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: '*' Action: 's3:GetObject' Resource: Fn::Join: - '' - - 'arn:aws:s3:::' - Ref: 'MyBucket' - '/*'
Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true MyBucketPolicy: Type: 'AWS::S3::BucketPolicy' Properties: Bucket: Ref: 'MyBucket' PolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: '*' Action: 's3:GetObject' Resource: Fn::Join: - '' - - 'arn:aws:s3:::' - Ref: 'MyBucket' - '/*'
Check: 2 Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket MyBucketPolicy: Type: 'AWS::S3::BucketPolicy' Properties: Bucket: Ref: 'MyBucket' PolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: '*' Action: 's3:GetObject' Resource: Fn::Join: - '' - - 'arn:aws:s3:::' - Ref: 'MyBucket' - '/*'
Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 MyBucketPolicy: Type: 'AWS::S3::BucketPolicy' Properties: Bucket: Ref: 'MyBucket' PolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: '*' Action: 's3:GetObject' Resource: Fn::Join: - '' - - 'arn:aws:s3:::' - Ref: 'MyBucket' - '/*'
Check: 1 Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket
Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true
Check: 2 Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket
Resources: MyBucket: Type: 'AWS::S3::Bucket' Properties: BucketName: my-bucket BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256
Check: 1 Resources: ######################### # # Curated Data Bucket # ######################### CuratedDataBucket: Type: AWS::S3::Bucket Properties: AccessControl: Private BucketName: !Sub ${ProjectName}-curated-${BucketNameSuffix} PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true VersioningConfiguration: Status: Enabled
Resources: ######################### # # Curated Data Bucket # ######################### CuratedDataBucket: Type: AWS::S3::Bucket Properties: AccessControl: Private BucketName: !Sub ${ProjectName}-curated-${BucketNameSuffix} PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true VersioningConfiguration: Status: Enabled
Check: 2 Resources: ######################### # # Curated Data Bucket # ######################### CuratedDataBucket: Type: AWS::S3::Bucket Properties: AccessControl: Private BucketName: !Sub ${ProjectName}-curated-${BucketNameSuffix} PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true VersioningConfiguration: Status: Enabled
Resources: ######################### # # Curated Data Bucket # ######################### CuratedDataBucket: Type: AWS::S3::Bucket Properties: AccessControl: Private BucketName: !Sub ${ProjectName}-curated-${BucketNameSuffix} PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 VersioningConfiguration: Status: Enabled
Check:1 QueryResultsBucket: Type: AWS::S3::Bucket Properties: AccessControl: Private VersioningConfiguration: Status: Enabled
QueryResultsBucket: Type: AWS::S3::Bucket Properties: AccessControl: Private PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true VersioningConfiguration: Status: Enabled
Check:2 QueryResultsBucket: Type: AWS::S3::Bucket Properties: AccessControl: Private VersioningConfiguration: Status: Enabled
QueryResultsBucket: Type: AWS::S3::Bucket Properties: AccessControl: Private BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 VersioningConfiguration: Status: Enabled
Check: 1 Resources: S3Bucket: Type: AWS::S3::Bucket Description: Creating Amazon S3 bucket from CloudFormation Properties: BucketName: i-named-this-bucket VersioningConfiguration: Status: Enabled
Resources: S3Bucket: Type: AWS::S3::Bucket Description: Creating Amazon S3 bucket from CloudFormation Properties: BucketName: i-named-this-bucket PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true VersioningConfiguration: Status: Enabled
Check: 2 Resources: S3Bucket: Type: AWS::S3::Bucket Description: Creating Amazon S3 bucket from CloudFormation Properties: BucketName: i-named-this-bucket VersioningConfiguration: Status: Enabled
Resources: S3Bucket: Type: AWS::S3::Bucket Description: Creating Amazon S3 bucket from CloudFormation Properties: BucketName: i-named-this-bucket BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 VersioningConfiguration: Status: Enabled
Check: 1 Resources: S3Bucket: DeletionPolicy: Retain Type: 'AWS::S3::Bucket' Description: Creating Amazon S3 bucket from CloudFormation Properties: AccessControl: Private PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 VersioningConfiguration: Status: Enabled
Resources: S3Bucket: DeletionPolicy: Retain Type: 'AWS::S3::Bucket' Description: Creating Amazon S3 bucket from CloudFormation Properties: AccessControl: Private PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 VersioningConfiguration: Status: Enabled
Check: 2 Resources: S3Bucket: DeletionPolicy: Retain Type: 'AWS::S3::Bucket' Description: Creating Amazon S3 bucket from CloudFormation Properties: AccessControl: Private PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 VersioningConfiguration: Status: Enabled
Resources: S3Bucket: DeletionPolicy: Retain Type: 'AWS::S3::Bucket' Description: Creating Amazon S3 bucket from CloudFormation Properties: AccessControl: Private PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 VersioningConfiguration: Status: Enabled
Check: 1 Resources: Bucket: Type: AWS::S3::Bucket Properties: AccessControl: !If [hasACL, !Ref ACL, !Ref "AWS::NoValue"] BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: KMSMasterKeyID: !If [useCustomKey, !Ref KmsKeyId, !Ref "AWS::NoValue"] SSEAlgorithm: !If [useCustomKey, "aws:kms", "AES256"] BucketName: !Ref BucketName VersioningConfiguration: Status: !Ref Versioning
Resources: Bucket: Type: AWS::S3::Bucket Properties: AccessControl: !If [hasACL, !Ref ACL, !Ref "AWS::NoValue"] BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: KMSMasterKeyID: !If [useCustomKey, !Ref KmsKeyId, !Ref "AWS::NoValue"] SSEAlgorithm: !If [useCustomKey, "aws:kms", "AES256"] BucketName: !Ref BucketName PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true VersioningConfiguration: Status: !Ref Versioning
Check: 2 Resources: Bucket: Type: AWS::S3::Bucket Properties: AccessControl: !If [hasACL, !Ref ACL, !Ref "AWS::NoValue"] BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: KMSMasterKeyID: !If [useCustomKey, !Ref KmsKeyId, !Ref "AWS::NoValue"] SSEAlgorithm: !If [useCustomKey, "aws:kms", "AES256"] BucketName: !Ref BucketName VersioningConfiguration: Status: !Ref Versioning
Resources: Bucket: Type: AWS::S3::Bucket Properties: AccessControl: !If [hasACL, !Ref ACL, !Ref "AWS::NoValue"] BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: KMSMasterKeyID: !If [useCustomKey, !Ref KmsKeyId, !Ref "AWS::NoValue"] SSEAlgorithm: !If [useCustomKey, "aws:kms", "AES256"] BucketName: !Ref BucketName VersioningConfiguration: Status: !Ref Versioning
Check: 1 Parameter: # S3 Bucket S3BucketName: Type: String Description: The name for the S3 bucket - must be unique across all of AWS (3-63 lowercase letters or numbers) Default: replaceme AllowedPattern: '^[a-z0-9]{5,40}$' ConstraintDescription: 3-63 characters; must contain only lowercase letters or numbers # S3 Bucket S3BucketName: Type: String Description: The name for the S3 bucket - must be unique across all of AWS (3-63 lowercase letters or numbers) Default: replaceme AllowedPattern: '^[a-z0-9]{5,40}$' ConstraintDescription: 3-63 characters; must contain only lowercase letters or numbers Resources: MyS3Bucket: Type: 'AWS::S3::Bucket' Properties: BucketName: !Join - '-' - - !Ref S3BucketName - !Ref 'AWS::Region'
Parameter: # S3 Bucket S3BucketName: Type: String Description: The name for the S3 bucket - must be unique across all of AWS (3-63 lowercase letters or numbers) Default: replaceme AllowedPattern: '^[a-z0-9]{5,40}$' ConstraintDescription: 3-63 characters; must contain only lowercase letters or numbers # S3 Bucket S3BucketName: Type: String Description: The name for the S3 bucket - must be unique across all of AWS (3-63 lowercase letters or numbers) Default: replaceme AllowedPattern: '^[a-z0-9]{5,40}$' ConstraintDescription: 3-63 characters; must contain only lowercase letters or numbers Resources: MyS3Bucket: Type: 'AWS::S3::Bucket' Properties: BucketName: !Join - '-' - - !Ref S3BucketName - !Ref 'AWS::Region' PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true
Check: 2 Parameter: # S3 Bucket S3BucketName: Type: String Description: The name for the S3 bucket - must be unique across all of AWS (3-63 lowercase letters or numbers) Default: replaceme AllowedPattern: '^[a-z0-9]{5,40}$' ConstraintDescription: 3-63 characters; must contain only lowercase letters or numbers # S3 Bucket S3BucketName: Type: String Description: The name for the S3 bucket - must be unique across all of AWS (3-63 lowercase letters or numbers) Default: replaceme AllowedPattern: '^[a-z0-9]{5,40}$' ConstraintDescription: 3-63 characters; must contain only lowercase letters or numbers Resources: MyS3Bucket: Type: 'AWS::S3::Bucket' Properties: BucketName: !Join - '-' - - !Ref S3BucketName - !Ref 'AWS::Region'
Parameter: # S3 Bucket S3BucketName: Type: String Description: The name for the S3 bucket - must be unique across all of AWS (3-63 lowercase letters or numbers) Default: replaceme AllowedPattern: '^[a-z0-9]{5,40}$' ConstraintDescription: 3-63 characters; must contain only lowercase letters or numbers # S3 Bucket S3BucketName: Type: String Description: The name for the S3 bucket - must be unique across all of AWS (3-63 lowercase letters or numbers) Default: replaceme AllowedPattern: '^[a-z0-9]{5,40}$' ConstraintDescription: 3-63 characters; must contain only lowercase letters or numbers Resources: MyS3Bucket: Type: 'AWS::S3::Bucket' Properties: BucketName: !Join - '-' - - !Ref S3BucketName - !Ref 'AWS::Region' BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256
Check: 1 Resources: Bucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName Tags: - Key: Name Value: !Join ['', [!Ref "AWS::StackName", "-Bucket"]]
Resources: Bucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true Tags: - Key: Name Value: !Join ['', [!Ref "AWS::StackName", "-Bucket"]]
Check: 2 Resources: Bucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName Tags: - Key: Name Value: !Join ['', [!Ref "AWS::StackName", "-Bucket"]]
Resources: Bucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 Tags: - Key: Name Value: !Join ['', [!Ref "AWS::StackName", "-Bucket"]]
Check: 1 Parameters: BucketName: Type: String Description: The name of the bucket. BucketAccessControl: Type: String Default: Private AllowedValues: - Private - PublicRead - PublicReadWrite - AuthenticatedRead - LogDeliveryWrite - BucketOwnerRead - BucketOwnerFullControl - AwsExecRead Description: Access control configuration for the bucket (default is Private). Resources: Bucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: !Ref BucketAccessControl Tags: - Key: Name Value: !Join ['', [!Ref "AWS::StackName", "-Bucket"]]
Parameters: BucketName: Type: String Description: The name of the bucket. BucketAccessControl: Type: String Default: Private AllowedValues: - Private - PublicRead - PublicReadWrite - AuthenticatedRead - LogDeliveryWrite - BucketOwnerRead - BucketOwnerFullControl - AwsExecRead Description: Access control configuration for the bucket (default is Private). Resources: Bucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: !Ref BucketAccessControl PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true Tags: - Key: Name Value: !Join ['', [!Ref "AWS::StackName", "-Bucket"]]
Check: 1 Parameters: BucketName: Type: String Description: The name of the bucket. BucketAccessControl: Type: String Default: Private AllowedValues: - Private - PublicRead - PublicReadWrite - AuthenticatedRead - LogDeliveryWrite - BucketOwnerRead - BucketOwnerFullControl - AwsExecRead Description: Access control configuration for the bucket (default is Private). Resources: Bucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: !Ref BucketAccessControl Tags: - Key: Name Value: !Join ['', [!Ref "AWS::StackName", "-Bucket"]]
Parameters: BucketName: Type: String Description: The name of the bucket. BucketAccessControl: Type: String Default: Private AllowedValues: - Private - PublicRead - PublicReadWrite - AuthenticatedRead - LogDeliveryWrite - BucketOwnerRead - BucketOwnerFullControl - AwsExecRead Description: Access control configuration for the bucket (default is Private). Resources: Bucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: !Ref BucketAccessControl BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 Tags: - Key: Name Value: !Join ['', [!Ref "AWS::StackName", "-Bucket"]]
Check: 1 Resources: LocalBucket: Type: AWS::S3::Bucket Properties: BucketName: cfn-quickstart-bucket
Resources: LocalBucket: Type: AWS::S3::Bucket Properties: BucketName: cfn-quickstart-bucket PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true
Check: 2 Resources: LocalBucket: Type: AWS::S3::Bucket Properties: BucketName: cfn-quickstart-bucket
Resources: LocalBucket: Type: AWS::S3::Bucket Properties: BucketName: cfn-quickstart-bucket BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256
Check: 1 Resources: # Create an S3 Bucket that serves a static website (i.e. React app) MyBucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: PublicRead # visitors need to be able to access the sie WebsiteConfiguration: # this makes the S3 Bucket a static website/app IndexDocument: index.html # default object served when visiting S3 domain ErrorDocument: index.html # just send to app, let React handle errors and routing
Resources: # Create an S3 Bucket that serves a static website (i.e. React app) MyBucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: PublicRead # visitors need to be able to access the sie WebsiteConfiguration: # this makes the S3 Bucket a static website/app IndexDocument: index.html # default object served when visiting S3 domain ErrorDocument: index.html # just send to app, let React handle errors and routing PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true
Check: 2 Resources: # Create an S3 Bucket that serves a static website (i.e. React app) MyBucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: PublicRead # visitors need to be able to access the sie WebsiteConfiguration: # this makes the S3 Bucket a static website/app IndexDocument: index.html # default object served when visiting S3 domain ErrorDocument: index.html # just send to app, let React handle errors and routing
Resources: # Create an S3 Bucket that serves a static website (i.e. React app) MyBucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: PublicRead # visitors need to be able to access the sie WebsiteConfiguration: # this makes the S3 Bucket a static website/app IndexDocument: index.html # default object served when visiting S3 domain ErrorDocument: index.html # just send to app, let React handle errors and routing BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256
Check: 1 Resources: # Create an S3 Bucket that serves a static website (i.e. React app) MyBucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: PublicRead # visitors need to be able to access the sie WebsiteConfiguration: # this makes the S3 Bucket a static website/app IndexDocument: index.html # default object served when visiting S3 domain ErrorDocument: index.html # just send to app, let React handle errors and routing # Add a Bucket Policy that lets public visitors access the web app MyBucketPolicy: Type: AWS::S3::BucketPolicy Properties: Bucket: !Ref MyBucket # attach to bucket being created PolicyDocument: Id: MyPolicy Version: 2012-10-17 Statement: # lets the public access/view the contents of your Bucket, i.e. web app - Sid: PublicReadForGetBucketObjects Effect: Allow Principal: '*' # wildcard, allow all requests Action: 's3:GetObject' Resource: !Join ['', ['arn:aws:s3:::', !Ref MyBucket, /*]]
Resources: # Create an S3 Bucket that serves a static website (i.e. React app) MyBucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: PublicRead # visitors need to be able to access the sie WebsiteConfiguration: # this makes the S3 Bucket a static website/app IndexDocument: index.html # default object served when visiting S3 domain ErrorDocument: index.html # just send to app, let React handle errors and routing PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true # Add a Bucket Policy that lets public visitors access the web app MyBucketPolicy: Type: AWS::S3::BucketPolicy Properties: Bucket: !Ref MyBucket # attach to bucket being created PolicyDocument: Id: MyPolicy Version: 2012-10-17 Statement: # lets the public access/view the contents of your Bucket, i.e. web app - Sid: PublicReadForGetBucketObjects Effect: Allow Principal: '*' # wildcard, allow all requests Action: 's3:GetObject' Resource: !Join ['', ['arn:aws:s3:::', !Ref MyBucket, /*]]
Check: 1 Resources: # Create an S3 Bucket that serves a static website (i.e. React app) MyBucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: PublicRead # visitors need to be able to access the sie WebsiteConfiguration: # this makes the S3 Bucket a static website/app IndexDocument: index.html # default object served when visiting S3 domain ErrorDocument: index.html # just send to app, let React handle errors and routing # Add a Bucket Policy that lets public visitors access the web app MyBucketPolicy: Type: AWS::S3::BucketPolicy Properties: Bucket: !Ref MyBucket # attach to bucket being created PolicyDocument: Id: MyPolicy Version: 2012-10-17 Statement: # lets the public access/view the contents of your Bucket, i.e. web app - Sid: PublicReadForGetBucketObjects Effect: Allow Principal: '*' # wildcard, allow all requests Action: 's3:GetObject' Resource: !Join ['', ['arn:aws:s3:::', !Ref MyBucket, /*]]
Resources: # Create an S3 Bucket that serves a static website (i.e. React app) MyBucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName AccessControl: PublicRead # visitors need to be able to access the sie WebsiteConfiguration: # this makes the S3 Bucket a static website/app IndexDocument: index.html # default object served when visiting S3 domain ErrorDocument: index.html # just send to app, let React handle errors and routing BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 # Add a Bucket Policy that lets public visitors access the web app MyBucketPolicy: Type: AWS::S3::BucketPolicy Properties: Bucket: !Ref MyBucket # attach to bucket being created PolicyDocument: Id: MyPolicy Version: 2012-10-17 Statement: # lets the public access/view the contents of your Bucket, i.e. web app - Sid: PublicReadForGetBucketObjects Effect: Allow Principal: '*' # wildcard, allow all requests Action: 's3:GetObject' Resource: !Join ['', ['arn:aws:s3:::', !Ref MyBucket, /*]]
Check: 1 AWSTemplateFormatVersion: '2010-09-09' Description: Amazon S3 Bucket with Resources: CodeFlexS3Bucket: Type: AWS::S3::Bucket Properties: AccessControl: Private BucketName: !Join ["-", ["codeflex-example", Ref: "AWS::Region"]] ForceEncryption: Type: AWS::S3::BucketPolicy Properties: Bucket: !Ref CodeFlexS3Bucket PolicyDocument: Version: "2008-10-17" Statement: - Sid: DenyUnEncryptedObjectUploads Effect: Deny Principal: "*" Action: - s3:PutObject Resource: - !Join ["", ["arn:aws:s3:::", !Ref CodeFlexS3Bucket, "/*"]] Condition: StringNotEquals: "s3:x-amz-server-side-encryption": - "aws:kms" DependsOn: CodeFlexS3Bucket
AWSTemplateFormatVersion: '2010-09-09' Description: Amazon S3 Bucket with Resources: CodeFlexS3Bucket: Type: AWS::S3::Bucket Properties: AccessControl: Private BucketName: !Join ["-", ["codeflex-example", Ref: "AWS::Region"]] PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true ForceEncryption: Type: AWS::S3::BucketPolicy Properties: Bucket: !Ref CodeFlexS3Bucket PolicyDocument: Version: "2012-10-17" Statement: - Sid: DenyUnEncryptedObjectUploads Effect: Deny Principal: "*" Action: - s3:PutObject Resource: - !Join ["", ["arn:aws:s3:::", !Ref CodeFlexS3Bucket, "/*"]] Condition: StringNotEquals: "s3:x-amz-server-side-encryption": - "aws:kms" DependsOn: CodeFlexS3Bucket
Check: 2 AWSTemplateFormatVersion: '2010-09-09' Description: Amazon S3 Bucket with Resources: CodeFlexS3Bucket: Type: AWS::S3::Bucket Properties: AccessControl: Private BucketName: !Join ["-", ["codeflex-example", Ref: "AWS::Region"]] ForceEncryption: Type: AWS::S3::BucketPolicy Properties: Bucket: !Ref CodeFlexS3Bucket PolicyDocument: Version: "2008-10-17" Statement: - Sid: DenyUnEncryptedObjectUploads Effect: Deny Principal: "*" Action: - s3:PutObject Resource: - !Join ["", ["arn:aws:s3:::", !Ref CodeFlexS3Bucket, "/*"]] Condition: StringNotEquals: "s3:x-amz-server-side-encryption": - "aws:kms" DependsOn: CodeFlexS3Bucket
AWSTemplateFormatVersion: '2010-09-09' Description: Amazon S3 Bucket with Resources: CodeFlexS3Bucket: Type: AWS::S3::Bucket Properties: AccessControl: Private BucketName: !Join ["-", ["codeflex-example", Ref: "AWS::Region"]] BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 ForceEncryption: Type: AWS::S3::BucketPolicy Properties: Bucket: !Ref CodeFlexS3Bucket PolicyDocument: Version: "2012-10-17" Statement: - Sid: DenyUnEncryptedObjectUploads Effect: Deny Principal: "*" Action: - s3:PutObject Resource: - !Join ["", ["arn:aws:s3:::", !Ref CodeFlexS3Bucket, "/*"]] Condition: StringNotEquals: "s3:x-amz-server-side-encryption": - "aws:kms" DependsOn: CodeFlexS3Bucket
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
0
Edit dataset card