Skip to content

Commit

Permalink
added cfn suppress rule on s3 logging bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
mickychetta committed Nov 3, 2021
1 parent 6fc6b3e commit bf49345
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ import { App, Stack, RemovalPolicy } from "@aws-cdk/core";
import { BucketEncryption } from "@aws-cdk/aws-s3";
import { KinesisFirehoseToAnalyticsAndS3 } from "../lib";
import { generateIntegStackName } from '@aws-solutions-constructs/core';
import * as s3 from "@aws-cdk/aws-s3";
import * as defaults from '@aws-solutions-constructs/core';

const app = new App();

// Empty arguments
const stack = new Stack(app, generateIntegStackName(__filename));

new KinesisFirehoseToAnalyticsAndS3(stack, 'test-kinesisfirehose-analytics-s3', {
const construct = new KinesisFirehoseToAnalyticsAndS3(stack, 'test-kinesisfirehose-analytics-s3', {
kinesisAnalyticsProps: {
inputs: [{
inputSchema: {
Expand Down Expand Up @@ -61,4 +63,12 @@ new KinesisFirehoseToAnalyticsAndS3(stack, 'test-kinesisfirehose-analytics-s3',
versioned: true
}
});

const s3Bucket = construct.s3Bucket as s3.Bucket;

defaults.addCfnSuppressRules(s3Bucket, [
{ id: 'W35',
reason: 'This S3 bucket is created for unit/ integration testing purposes only.' },
]);

app.synth();

0 comments on commit bf49345

Please sign in to comment.