diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.no-arguments.expected.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.no-arguments.expected.json index 6fd61bb1a..564b18681 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.no-arguments.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.no-arguments.expected.json @@ -868,4 +868,4 @@ } } } -} \ No newline at end of file +} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/lib/index.ts index fa26509aa..13b0cd237 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/lib/index.ts @@ -51,7 +51,7 @@ export interface CloudFrontToMediaStoreProps { export class CloudFrontToMediaStore extends Construct { public readonly cloudFrontWebDistribution: cloudfront.Distribution; public readonly mediaStoreContainer: mediastore.CfnContainer; - public readonly cloudFrontLoggingBucket: s3.Bucket; + public readonly cloudFrontLoggingBucket?: s3.Bucket; public readonly cloudFrontOriginRequestPolicy: cloudfront.OriginRequestPolicy; public readonly cloudFrontOriginAccessIdentity?: cloudfront.OriginAccessIdentity; public readonly cloudFrontFunction?: cloudfront.Function; diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.default.expected.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.default.expected.json index 69c2e9139..c445ab84b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.default.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.default.expected.json @@ -320,4 +320,4 @@ } } } -} \ No newline at end of file +} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.existingContainer.expected.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.existingContainer.expected.json index efaf5cd9c..327f4c83e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.existingContainer.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.existingContainer.expected.json @@ -237,4 +237,4 @@ } } } -} \ No newline at end of file +} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.overrideProperties.expected.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.overrideProperties.expected.json index a4e4c61d3..37397a7d9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.overrideProperties.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.overrideProperties.expected.json @@ -279,4 +279,4 @@ } } } -} \ No newline at end of file +} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.withoutHttpSecurityHeaders.expected.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.withoutHttpSecurityHeaders.expected.json index 0f58b8a00..ea71643c1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.withoutHttpSecurityHeaders.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.withoutHttpSecurityHeaders.expected.json @@ -297,4 +297,4 @@ } } } -} \ No newline at end of file +} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.custom-security-headers.expected.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.custom-security-headers.expected.json index 0fedbca79..2f3ab0817 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.custom-security-headers.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.custom-security-headers.expected.json @@ -419,4 +419,4 @@ } } } -} \ No newline at end of file +} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.existing-bucket.expected.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.existing-bucket.expected.json index dc05ebc4f..635edf9b2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.existing-bucket.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.existing-bucket.expected.json @@ -352,4 +352,4 @@ } } } -} \ No newline at end of file +} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.no-arguments.expected.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.no-arguments.expected.json index a1180448e..00d9e087b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.no-arguments.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.no-arguments.expected.json @@ -387,4 +387,4 @@ } } } -} \ No newline at end of file +} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/test.cloudfront-s3.test.ts b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/test.cloudfront-s3.test.ts index b64e6ec36..66cf6205e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/test.cloudfront-s3.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/test.cloudfront-s3.test.ts @@ -12,18 +12,19 @@ */ import { ResourcePart, SynthUtils } from '@aws-cdk/assert'; -import { CloudFrontToS3, CloudFrontToS3Props } from "../lib"; -import * as cdk from "@aws-cdk/core"; -import * as s3 from '@aws-cdk/aws-s3'; import '@aws-cdk/assert/jest'; import * as acm from '@aws-cdk/aws-certificatemanager'; +import * as s3 from '@aws-cdk/aws-s3'; +import * as cdk from "@aws-cdk/core"; import { RemovalPolicy } from '@aws-cdk/core'; +import { CloudFrontToS3, CloudFrontToS3Props } from "../lib"; -function deploy(stack: cdk.Stack) { +function deploy(stack: cdk.Stack, props?: CloudFrontToS3Props) { return new CloudFrontToS3(stack, 'test-cloudfront-s3', { bucketProps: { removalPolicy: cdk.RemovalPolicy.DESTROY, - } + }, + ...props }); } @@ -284,4 +285,13 @@ test("Test existingBucketInterface", () => { ] } }); -}); \ No newline at end of file +}); + + +test('test cloudfront disable cloudfront logging', () => { + const stack = new cdk.Stack(); + + const construct = deploy(stack, {cloudFrontDistributionProps: {enableLogging: false}} ); + + expect(construct.cloudFrontLoggingBucket === undefined); +}); diff --git a/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-defaults.ts b/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-defaults.ts index b56695ea6..1f5c46c59 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-defaults.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-defaults.ts @@ -11,88 +11,53 @@ * and limitations under the License. */ +import * as api from '@aws-cdk/aws-apigateway'; import * as cloudfront from '@aws-cdk/aws-cloudfront'; +import { FunctionEventType } from '@aws-cdk/aws-cloudfront'; import * as origins from '@aws-cdk/aws-cloudfront-origins'; -import * as s3 from '@aws-cdk/aws-s3'; -import * as api from '@aws-cdk/aws-apigateway'; import * as mediastore from '@aws-cdk/aws-mediastore'; +import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; -import { FunctionEventType } from '@aws-cdk/aws-cloudfront'; export function DefaultCloudFrontWebDistributionForApiGatewayProps(apiEndPoint: api.RestApi, - loggingBucket: s3.Bucket, + loggingBucket: s3.Bucket | undefined, setHttpSecurityHeaders: boolean, cfFunction?: cloudfront.IFunction): cloudfront.DistributionProps { const apiEndPointUrlWithoutProtocol = cdk.Fn.select(1, cdk.Fn.split("://", apiEndPoint.url)); const apiEndPointDomainName = cdk.Fn.select(0, cdk.Fn.split("/", apiEndPointUrlWithoutProtocol)); - if (setHttpSecurityHeaders) { - return { - defaultBehavior: { - origin: new origins.HttpOrigin(apiEndPointDomainName, { - originPath: `/${apiEndPoint.deploymentStage.stageName}` - }), - functionAssociations: [ - { - eventType: FunctionEventType.VIEWER_RESPONSE, - function: cfFunction - } - ], - viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS - }, - enableLogging: true, - logBucket: loggingBucket, - } as cloudfront.DistributionProps; - } else { - return { - defaultBehavior: { - origin: new origins.HttpOrigin(apiEndPointDomainName, { - originPath: `/${apiEndPoint.deploymentStage.stageName}` - }), - viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS - }, - enableLogging: true, - logBucket: loggingBucket, - } as cloudfront.DistributionProps; - } + return { + defaultBehavior: { + origin: new origins.HttpOrigin(apiEndPointDomainName, { + originPath: `/${apiEndPoint.deploymentStage.stageName}` + }), + ...getFunctionAssociationsProp(setHttpSecurityHeaders, cfFunction), + viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS + }, + enableLogging: true, + logBucket: loggingBucket, + }; } -export function DefaultCloudFrontWebDistributionForS3Props(sourceBucket: s3.IBucket, loggingBucket: s3.Bucket, +export function DefaultCloudFrontWebDistributionForS3Props(sourceBucket: s3.IBucket, loggingBucket: s3.Bucket | undefined, setHttpSecurityHeaders: boolean, cfFunction?: cloudfront.IFunction): cloudfront.DistributionProps { - if (setHttpSecurityHeaders) { - return { - defaultBehavior: { - origin: new origins.S3Origin(sourceBucket), - functionAssociations: [ - { - eventType: FunctionEventType.VIEWER_RESPONSE, - function: cfFunction - } - ], - viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS - }, - enableLogging: true, - logBucket: loggingBucket, - defaultRootObject: 'index.html' - } as cloudfront.DistributionProps; - } else { - return { - defaultBehavior: { - origin: new origins.S3Origin(sourceBucket), - viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS - }, - enableLogging: true, - logBucket: loggingBucket, - defaultRootObject: 'index.html' - } as cloudfront.DistributionProps; - } + return { + defaultBehavior: { + origin: new origins.S3Origin(sourceBucket), + viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS, + ...getFunctionAssociationsProp(setHttpSecurityHeaders, cfFunction) + }, + enableLogging: true, + logBucket: loggingBucket, + defaultRootObject: 'index.html' + }; } export function DefaultCloudFrontDisributionForMediaStoreProps(mediastoreContainer: mediastore.CfnContainer, - loggingBucket: s3.Bucket, + loggingBucket: s3.Bucket | undefined, originRequestPolicy: cloudfront.OriginRequestPolicy, setHttpSecurityHeaders: boolean, customHeaders?: Record, @@ -105,35 +70,27 @@ export function DefaultCloudFrontDisributionForMediaStoreProps(mediastoreContain new origins.HttpOrigin(mediaStoreContainerDomainName, { customHeaders }) : new origins.HttpOrigin(mediaStoreContainerDomainName); - if (setHttpSecurityHeaders) { - return { - defaultBehavior: { - origin: httpOrigin, - functionAssociations: [ - { - eventType: FunctionEventType.VIEWER_RESPONSE, - function: cfFunction - } - ], - viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS, - allowedMethods: cloudfront.AllowedMethods.ALLOW_GET_HEAD_OPTIONS, - cachedMethods: cloudfront.CachedMethods.CACHE_GET_HEAD_OPTIONS, - originRequestPolicy - }, - enableLogging: true, - logBucket: loggingBucket - } as cloudfront.DistributionProps; - } else { - return { - defaultBehavior: { - origin: httpOrigin, - viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS, - allowedMethods: cloudfront.AllowedMethods.ALLOW_GET_HEAD_OPTIONS, - cachedMethods: cloudfront.CachedMethods.CACHE_GET_HEAD_OPTIONS, - originRequestPolicy - }, - enableLogging: true, - logBucket: loggingBucket - } as cloudfront.DistributionProps; - } -} \ No newline at end of file + return { + defaultBehavior: { + origin: httpOrigin, + viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS, + allowedMethods: cloudfront.AllowedMethods.ALLOW_GET_HEAD_OPTIONS, + cachedMethods: cloudfront.CachedMethods.CACHE_GET_HEAD_OPTIONS, + originRequestPolicy, + ...getFunctionAssociationsProp(setHttpSecurityHeaders, cfFunction) + }, + enableLogging: true, + logBucket: loggingBucket + }; +} + +function getFunctionAssociationsProp(setHttpSecurityHeaders: boolean, cfFunction: cloudfront.IFunction | undefined) { + return (setHttpSecurityHeaders && cfFunction) ? { + functionAssociations: [ + { + eventType: FunctionEventType.VIEWER_RESPONSE, + function: cfFunction + } + ] + } : {}; +} diff --git a/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts b/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts index 19d32ecea..95ad572f5 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts @@ -62,33 +62,18 @@ function defaultCloudfrontFunction(scope: cdk.Construct): cloudfront.Function { export function CloudFrontDistributionForApiGateway(scope: cdk.Construct, apiEndPoint: api.RestApi, cloudFrontDistributionProps?: cloudfront.DistributionProps | any, - httpSecurityHeaders?: boolean): [cloudfront.Distribution, + httpSecurityHeaders: boolean = true): [cloudfront.Distribution, cloudfront.Function?, s3.Bucket?] { - const _httpSecurityHeaders = (httpSecurityHeaders !== undefined && httpSecurityHeaders === false) ? false : true; + const cloudfrontFunction = getCloudfrontFunction(httpSecurityHeaders, scope); - let defaultprops: cloudfront.DistributionProps; - let cloudfrontFunction; - let loggingBucket; + const loggingBucket = getLoggingBucket(cloudFrontDistributionProps, scope); - if (_httpSecurityHeaders) { - cloudfrontFunction = defaultCloudfrontFunction(scope); - } - - if (cloudFrontDistributionProps && cloudFrontDistributionProps.enableLogging && cloudFrontDistributionProps.logBucket) { - defaultprops = DefaultCloudFrontWebDistributionForApiGatewayProps(apiEndPoint, - cloudFrontDistributionProps.logBucket, _httpSecurityHeaders, - cloudfrontFunction); - } else { - loggingBucket = createLoggingBucket(scope, 'CloudfrontLoggingBucket'); - defaultprops = DefaultCloudFrontWebDistributionForApiGatewayProps(apiEndPoint, - loggingBucket, _httpSecurityHeaders, - cloudfrontFunction); - } + const defaultprops = DefaultCloudFrontWebDistributionForApiGatewayProps(apiEndPoint, loggingBucket, httpSecurityHeaders, cloudfrontFunction); const cfprops = cloudFrontDistributionProps ? overrideProps(defaultprops, cloudFrontDistributionProps, false) : defaultprops; // Create the Cloudfront Distribution - const cfDistribution: cloudfront.Distribution = new cloudfront.Distribution(scope, 'CloudFrontDistribution', cfprops); + const cfDistribution = new cloudfront.Distribution(scope, 'CloudFrontDistribution', cfprops); updateSecurityPolicy(cfDistribution); return [cfDistribution, cloudfrontFunction, loggingBucket]; @@ -97,30 +82,18 @@ export function CloudFrontDistributionForApiGateway(scope: cdk.Construct, export function CloudFrontDistributionForS3(scope: cdk.Construct, sourceBucket: s3.IBucket, cloudFrontDistributionProps?: cloudfront.DistributionProps | any, - httpSecurityHeaders?: boolean): [cloudfront.Distribution, + httpSecurityHeaders: boolean = true): [cloudfront.Distribution, cloudfront.Function?, s3.Bucket?] { - let defaultprops: cloudfront.DistributionProps; - let cloudfrontFunction; - let loggingBucket; - const _httpSecurityHeaders = (httpSecurityHeaders !== undefined && httpSecurityHeaders === false) ? false : true; + const cloudfrontFunction = getCloudfrontFunction(httpSecurityHeaders, scope); - if (_httpSecurityHeaders) { - cloudfrontFunction = defaultCloudfrontFunction(scope); - } + const loggingBucket = getLoggingBucket(cloudFrontDistributionProps, scope); - if (cloudFrontDistributionProps && cloudFrontDistributionProps.enableLogging && cloudFrontDistributionProps.logBucket) { - defaultprops = DefaultCloudFrontWebDistributionForS3Props(sourceBucket, - cloudFrontDistributionProps.logBucket, _httpSecurityHeaders, cloudfrontFunction); - } else { - loggingBucket = createLoggingBucket(scope, 'CloudfrontLoggingBucket'); - defaultprops = DefaultCloudFrontWebDistributionForS3Props(sourceBucket, loggingBucket, - _httpSecurityHeaders, cloudfrontFunction); - } + const defaultprops = DefaultCloudFrontWebDistributionForS3Props(sourceBucket, loggingBucket, httpSecurityHeaders, cloudfrontFunction); const cfprops = cloudFrontDistributionProps ? overrideProps(defaultprops, cloudFrontDistributionProps, false) : defaultprops; // Create the Cloudfront Distribution - const cfDistribution: cloudfront.Distribution = new cloudfront.Distribution(scope, 'CloudFrontDistribution', cfprops); + const cfDistribution = new cloudfront.Distribution(scope, 'CloudFrontDistribution', cfprops); updateSecurityPolicy(cfDistribution); // Extract the CfnBucketPolicy from the sourceBucket @@ -140,24 +113,12 @@ export function CloudFrontDistributionForS3(scope: cdk.Construct, export function CloudFrontDistributionForMediaStore(scope: cdk.Construct, mediaStoreContainer: mediastore.CfnContainer, cloudFrontDistributionProps?: cloudfront.DistributionProps | any, - httpSecurityHeaders?: boolean): [cloudfront.Distribution, - s3.Bucket, cloudfront.OriginRequestPolicy, cloudfront.Function?] { + httpSecurityHeaders: boolean = true): [cloudfront.Distribution, + s3.Bucket | undefined, cloudfront.OriginRequestPolicy, cloudfront.Function?] { - let defaultprops: cloudfront.DistributionProps; let originRequestPolicy: cloudfront.OriginRequestPolicy; - let loggingBucket: s3.Bucket; - let cloudfrontFunction; - const _httpSecurityHeaders = (httpSecurityHeaders !== undefined && httpSecurityHeaders === false) ? false : true; - if (_httpSecurityHeaders) { - cloudfrontFunction = defaultCloudfrontFunction(scope); - } - - if (cloudFrontDistributionProps && cloudFrontDistributionProps.enableLogging && cloudFrontDistributionProps.logBucket) { - loggingBucket = cloudFrontDistributionProps.logBucket as s3.Bucket; - } else { - loggingBucket = createLoggingBucket(scope, 'CloudfrontLoggingBucket'); - } + const loggingBucket = getLoggingBucket(cloudFrontDistributionProps, scope); if (cloudFrontDistributionProps && cloudFrontDistributionProps.defaultBehavior @@ -187,11 +148,13 @@ export function CloudFrontDistributionForMediaStore(scope: cdk.Construct, originRequestPolicy = new cloudfront.OriginRequestPolicy(scope, 'CloudfrontOriginRequestPolicy', originRequestPolicyProps); } - defaultprops = DefaultCloudFrontDisributionForMediaStoreProps( + const cloudfrontFunction = getCloudfrontFunction(httpSecurityHeaders, scope); + + const defaultprops = DefaultCloudFrontDisributionForMediaStoreProps( mediaStoreContainer, loggingBucket, originRequestPolicy, - _httpSecurityHeaders, + httpSecurityHeaders, cloudFrontDistributionProps?.customHeaders, cloudfrontFunction ); @@ -205,7 +168,7 @@ export function CloudFrontDistributionForMediaStore(scope: cdk.Construct, } // Create the CloudFront Distribution - const cfDistribution: cloudfront.Distribution = new cloudfront.Distribution(scope, 'CloudFrontDistribution', cfprops); + const cfDistribution = new cloudfront.Distribution(scope, 'CloudFrontDistribution', cfprops); updateSecurityPolicy(cfDistribution); return [cfDistribution, loggingBucket, originRequestPolicy, cloudfrontFunction]; @@ -215,4 +178,16 @@ export function CloudFrontOriginAccessIdentity(scope: cdk.Construct, comment?: s return new cloudfront.OriginAccessIdentity(scope, 'CloudFrontOriginAccessIdentity', { comment: comment ? comment : `access-identity-${cdk.Aws.REGION}-${cdk.Aws.STACK_NAME}` }); -} \ No newline at end of file +} + +function getLoggingBucket(cloudFrontDistributionProps: cloudfront.DistributionProps | any, scope: cdk.Construct): s3.Bucket | undefined { + const isLoggingDisabled = cloudFrontDistributionProps?.enableLogging === false + const userSuppliedLogBucket = cloudFrontDistributionProps?.logBucket + return isLoggingDisabled + ? undefined + : userSuppliedLogBucket ?? createLoggingBucket(scope, 'CloudfrontLoggingBucket'); +} + +function getCloudfrontFunction(httpSecurityHeaders: boolean, scope: cdk.Construct) { + return httpSecurityHeaders ? defaultCloudfrontFunction(scope) : undefined; +} diff --git a/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-api-gateway-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-api-gateway-helper.test.ts index a6d8b20f0..64845bf75 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-api-gateway-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-api-gateway-helper.test.ts @@ -550,4 +550,4 @@ test('test override cloudfront replace custom lambda@edge', () => { ] } }); -}); \ No newline at end of file +}); diff --git a/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-s3-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-s3-helper.test.ts index 60694d2dd..c1e027640 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-s3-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-s3-helper.test.ts @@ -58,7 +58,7 @@ test('check bucket metadata', () => { rules_to_suppress: [ { id: "W35", - reason: "This S3 bucket is used as the access logging bucket for CloudFront Distribution" + reason: "This S3 bucket is used as the access logging bucket for another bucket" } ] } @@ -565,4 +565,4 @@ test('test override cloudfront replace custom lambda@edge', () => { ] } }); -}); \ No newline at end of file +});