diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e4d6652d..bfe6fd059 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.72.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.71.0...v2.72.0) (2024-10-06) + +Build on CDK v2.161.0 + +### Features + +* **aws-apigateway-sqs:** add schema validation for create operation ([#1216](https://github.com/awslabs/aws-solutions-constructs/issues/1216)) ([9d42398](https://github.com/awslabs/aws-solutions-constructs/commit/9d423986b8aaee4c921000e8738ce8ad5ef78765)) + ## [2.71.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.70.0...v2.71.0) (2024-09-27) Build on CDK v2.160.0 diff --git a/deployment/v2/align-version.js b/deployment/v2/align-version.js index ae42df785..43f251dc9 100755 --- a/deployment/v2/align-version.js +++ b/deployment/v2/align-version.js @@ -10,7 +10,7 @@ const nullVersionMarker = process.argv[2]; const targetSolutionsConstructsVersion = process.argv[3]; // these versions need to be sourced from a config file -const awsCdkLibVersion = '2.160.0'; +const awsCdkLibVersion = '2.161.0'; for (const file of process.argv.splice(4)) { const pkg = JSON.parse(fs.readFileSync(file).toString()); diff --git a/source/lerna.json b/source/lerna.json index 3262810bd..b9499e273 100644 --- a/source/lerna.json +++ b/source/lerna.json @@ -5,5 +5,5 @@ "patterns/@aws-solutions-constructs/*" ], "rejectCycles": "true", - "version": "2.71.0" + "version": "2.72.0" } diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/README.md b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/README.md index c69dd7bdd..f49e5ca89 100755 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/README.md +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/README.md @@ -81,6 +81,7 @@ new ApiGatewayToSqs(this, "ApiGatewayToSqsPattern", new ApiGatewayToSqsProps.Bui |enableEncryptionWithCustomerManagedKey?|`boolean`|If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key. This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps.| |encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|An optional, imported encryption key to encrypt the SQS Queue with.| |encryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html#construct-props)|Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.| +|messageSchema?|{ [contentType: string]: [api.JsonSchema](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.JsonSchema.html); }|Optional schema to define format of incoming message in API request body. Example: { "application/json": { schema: api.JsonSchemaVersion.DRAFT4, title: 'pollResponse', type: api.JsonSchemaType.OBJECT, required: ['firstProperty', 'antotherProperty'], additionalProperties: false, properties: { firstProperty: { type: api.JsonSchemaType.STRING }, antotherProperty: { type: api.JsonSchemaType.STRING } } } Only relevant for create operation, if allowCreateOperation is not true, then supplying this is an error. Sending this value causes this construct to turn on validation for the request body. @default - None| ## Pattern Properties diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/lib/index.ts index f3a6b54d8..9a15c2caf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/lib/index.ts @@ -226,6 +226,29 @@ export interface ApiGatewayToSqsProps { * @default - None */ readonly encryptionKeyProps?: kms.KeyProps; + /** + * Optional schema to define format of incoming message in API request body. Example: + * { + * "application/json": { + * schema: api.JsonSchemaVersion.DRAFT4, + * title: 'pollResponse', + * type: api.JsonSchemaType.OBJECT, + * required: ['firstProperty', 'antotherProperty'], + * additionalProperties: false, + * properties: { + * firstProperty: { type: api.JsonSchemaType.STRING }, + * antotherProperty: { type: api.JsonSchemaType.STRING } + * } + * } + * + * Only relevant for create operation, if allowCreateOperation is not true, then supplying this + * is an error. + * + * Sending this value causes this construct to turn on validation for the request body. + * + * @default - None + */ + readonly messageSchema?: { [contentType: string]: api.JsonSchema; }; } /** @@ -257,7 +280,7 @@ export class ApiGatewayToSqs extends Construct { if (this.CheckCreateRequestProps(props)) { throw new Error(`The 'allowCreateOperation' property must be set to true when setting any of the following: ` + - `'createRequestTemplate', 'additionalCreateRequestTemplates', 'createIntegrationResponses'`); + `'createRequestTemplate', 'additionalCreateRequestTemplates', 'createIntegrationResponses', 'messageSchema'`); } if (this.CheckReadRequestProps(props)) { throw new Error(`The 'allowReadOperation' property must be set to true or undefined when setting any of the following: ` + @@ -265,7 +288,7 @@ export class ApiGatewayToSqs extends Construct { } if (this.CheckDeleteRequestProps(props)) { throw new Error(`The 'allowDeleteOperation' property must be set to true when setting any of the following: ` + - `'deleteRequestTemplate', 'additionalDeleteRequestTemplates', 'deleteIntegrationResponses'`); + `'deleteRequestTemplate', 'additionalDeleteRequestTemplates', 'deleteIntegrationResponses'`); } // Setup the queue @@ -296,7 +319,35 @@ export class ApiGatewayToSqs extends Construct { // Create const createRequestTemplate = props.createRequestTemplate ?? this.defaultCreateRequestTemplate; if (props.allowCreateOperation && props.allowCreateOperation === true) { - const createMethodOptions: api.MethodOptions = props.createMethodResponses ? { methodResponses: props.createMethodResponses } : {}; + let createMethodOptions: api.MethodOptions = {}; + + // If the client supplied model definitions, set requestModels + if (props.messageSchema) { + const requestModels: { [contentType: string]: api.IModel; } = {}; + Object.keys(props.messageSchema).forEach(key => { + const contentType = key; + const schema = props.messageSchema![key]; + + const newModel = new api.Model(this, `${id}-model-${defaults.removeNonAlphanumeric(contentType)}`, { + restApi: this.apiGateway, + contentType, + schema + }); + + requestModels[contentType] = newModel; + createMethodOptions = defaults.overrideProps(createMethodOptions, { + requestModels, + requestValidatorOptions: { + validateRequestBody: true + } + }); + }); + } + + if (props.createMethodResponses) { + createMethodOptions = defaults.overrideProps(createMethodOptions, { methodResponses: props.createMethodResponses }); + } + this.addActionToPolicy("sqs:SendMessage"); defaults.addProxyMethodToApiResource({ service: "sqs", @@ -353,22 +404,22 @@ export class ApiGatewayToSqs extends Construct { } private CheckReadRequestProps(props: ApiGatewayToSqsProps): boolean { if ((props.readRequestTemplate || props.additionalReadRequestTemplates || props.readIntegrationResponses) - && props.allowReadOperation === false) { + && props.allowReadOperation === false) { return true; } return false; } private CheckDeleteRequestProps(props: ApiGatewayToSqsProps): boolean { if ((props.deleteRequestTemplate || props.additionalDeleteRequestTemplates || props.deleteIntegrationResponses) - && props.allowDeleteOperation !== true) { + && props.allowDeleteOperation !== true) { return true; } return false; } private CheckCreateRequestProps(props: ApiGatewayToSqsProps): boolean { - if ((props.createRequestTemplate || props.additionalCreateRequestTemplates || props.createIntegrationResponses) - && props.allowCreateOperation !== true) { + if ((props.createRequestTemplate || props.additionalCreateRequestTemplates || props.createIntegrationResponses || props.messageSchema) + && props.allowCreateOperation !== true) { return true; } return false; @@ -379,7 +430,7 @@ export class ApiGatewayToSqs extends Construct { resources: [ this.sqsQueue.queueArn ], - actions: [ `${action}` ] + actions: [`${action}`] })); } } diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/apigateway-sqs.test.ts b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/apigateway-sqs.test.ts index 24f8640b5..df5539180 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/apigateway-sqs.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/apigateway-sqs.test.ts @@ -13,11 +13,11 @@ // Imports import { RemovalPolicy, Stack } from "aws-cdk-lib"; -import { ApiGatewayToSqs } from '../lib'; +import { ApiGatewayToSqs, ApiGatewayToSqsProps } from '../lib'; import * as api from "aws-cdk-lib/aws-apigateway"; import * as kms from 'aws-cdk-lib/aws-kms'; import * as sqs from "aws-cdk-lib/aws-sqs"; -import { Template } from "aws-cdk-lib/assertions"; +import { Match, Template } from "aws-cdk-lib/assertions"; test('Test deployment w/o DLQ', () => { const stack = new Stack(); @@ -69,7 +69,7 @@ test('Test properties', () => { deployDeadLetterQueue: true, maxReceiveCount: 3 }); - // Assertion 1 + // Assertion 1 expect(pattern.apiGateway).toBeDefined(); // Assertion 2 expect(pattern.sqsQueue).toBeDefined(); @@ -113,7 +113,7 @@ test('Test deployment for override ApiGateway createRequestTemplate', () => { const stack = new Stack(); new ApiGatewayToSqs(stack, 'api-gateway-sqs', { - createRequestTemplate: "Action=SendMessage&MessageBody=$util.urlEncode(\"HelloWorld\")", + createRequestTemplate: "Action=SendMessage&MessageBody=$util.urlEncode(\"HelloWorld\")", allowCreateOperation: true }); const template = Template.fromStack(stack); @@ -131,7 +131,7 @@ test('Test deployment for override ApiGateway getRequestTemplate', () => { const stack = new Stack(); new ApiGatewayToSqs(stack, 'api-gateway-sqs', { - readRequestTemplate: "Action=HelloWorld", + readRequestTemplate: "Action=HelloWorld", allowReadOperation: true }); const template = Template.fromStack(stack); @@ -149,7 +149,7 @@ test('Test deployment for override ApiGateway deleteRequestTemplate', () => { const stack = new Stack(); new ApiGatewayToSqs(stack, 'api-gateway-sqs', { - deleteRequestTemplate: "Action=HelloWorld", + deleteRequestTemplate: "Action=HelloWorld", allowDeleteOperation: true }); const template = Template.fromStack(stack); @@ -577,13 +577,22 @@ test('Construct uses custom deleteIntegrationResponses property', () => { }); }); +test('Construct throws error when messageSchema is set and allowCreateOperation is not true', () => { + const stack = new Stack(); + const app = () => new ApiGatewayToSqs(stack, 'api-gateway-sqs', { + messageSchema: '{}' as any, + }); + + expect(app).toThrowError(/The 'allowCreateOperation' property must be set to true when setting any of the following: 'createRequestTemplate', 'additionalCreateRequestTemplates', 'createIntegrationResponses', 'messageSchema'/); +}); + test('Construct throws error when createRequestTemplate is set and allowCreateOperation is not true', () => { const stack = new Stack(); const app = () => new ApiGatewayToSqs(stack, 'api-gateway-sqs', { createRequestTemplate: '{}', }); - expect(app).toThrowError(/The 'allowCreateOperation' property must be set to true when setting any of the following: 'createRequestTemplate', 'additionalCreateRequestTemplates', 'createIntegrationResponses'/); + expect(app).toThrowError(/The 'allowCreateOperation' property must be set to true when setting any of the following: 'createRequestTemplate', 'additionalCreateRequestTemplates', 'createIntegrationResponses', 'messageSchema'/); }); test('Construct throws error when additionalCreateRequestTemplates is set and allowCreateOperation is not true', () => { @@ -592,7 +601,7 @@ test('Construct throws error when additionalCreateRequestTemplates is set and al additionalCreateRequestTemplates: {} }); - expect(app).toThrowError(/The 'allowCreateOperation' property must be set to true when setting any of the following: 'createRequestTemplate', 'additionalCreateRequestTemplates', 'createIntegrationResponses'/); + expect(app).toThrowError(/The 'allowCreateOperation' property must be set to true when setting any of the following: 'createRequestTemplate', 'additionalCreateRequestTemplates', 'createIntegrationResponses', 'messageSchema'/); }); test('Construct throws error when createIntegrationResponses is set and allowCreateOperation is not true', () => { @@ -601,7 +610,7 @@ test('Construct throws error when createIntegrationResponses is set and allowCre createIntegrationResponses: [] }); - expect(app).toThrowError(/The 'allowCreateOperation' property must be set to true when setting any of the following: 'createRequestTemplate', 'additionalCreateRequestTemplates', 'createIntegrationResponses'/); + expect(app).toThrowError(/The 'allowCreateOperation' property must be set to true when setting any of the following: 'createRequestTemplate', 'additionalCreateRequestTemplates', 'createIntegrationResponses', 'messageSchema'/); }); test('Construct throws error when readRequestTemplate is set and allowReadOperation is false', () => { @@ -694,6 +703,7 @@ test('Construct uses custom createMethodResponses property', () => { }); const template = Template.fromStack(stack); + template.hasResourceProperties('AWS::ApiGateway::Method', { HttpMethod: 'POST', MethodResponses: [{ @@ -712,7 +722,7 @@ test('Construct uses custom createMethodResponses property', () => { }); }); -test.only('Construct uses custom deleteMethodResponses property', () => { +test('Construct uses custom deleteMethodResponses property', () => { const stack = new Stack(); new ApiGatewayToSqs(stack, 'api-gateway-sqs', { allowCreateOperation: false, @@ -750,7 +760,7 @@ test.only('Construct uses custom deleteMethodResponses property', () => { }); }); -test.only('Construct uses custom readMethodResponses property', () => { +test('Construct uses custom readMethodResponses property', () => { const stack = new Stack(); new ApiGatewayToSqs(stack, 'api-gateway-sqs', { allowCreateOperation: false, @@ -787,3 +797,90 @@ test.only('Construct uses custom readMethodResponses property', () => { } }); }); + +test('Construct uses mulitple custom messageSchema', () => { + const stack = new Stack(); + const props: ApiGatewayToSqsProps = { + allowCreateOperation: true, + messageSchema: { + "application/json": { + schema: api.JsonSchemaVersion.DRAFT4, + title: 'pollResponse', + type: api.JsonSchemaType.OBJECT, + required: ['state', 'greeting'], + additionalProperties: false, + properties: { + state: { type: api.JsonSchemaType.STRING }, + greeting: { type: api.JsonSchemaType.STRING } + } + }, + "application/text": { + schema: api.JsonSchemaVersion.DRAFT4, + title: 'pollResponse', + type: api.JsonSchemaType.OBJECT, + additionalProperties: false, + properties: { + textstate: { type: api.JsonSchemaType.STRING }, + textgreeting: { type: api.JsonSchemaType.STRING } + } + } + } + }; + + new ApiGatewayToSqs(stack, 'test-api-gateway-sqs', props); + const template = Template.fromStack(stack); + template.resourceCountIs("AWS::ApiGateway::Model", 2); + template.hasResourceProperties("AWS::ApiGateway::Model", { + ContentType: "application/json", + RestApiId: Match.anyValue(), + Schema: { + $schema: "http://json-schema.org/draft-04/schema#", + title: "pollResponse", + type: "object", + required: [ + "state", + "greeting" + ], + additionalProperties: false, + properties: { + state: { + type: "string" + }, + greeting: { + type: "string" + } + } + } + }); + template.hasResourceProperties("AWS::ApiGateway::Model", { + ContentType: "application/text", + RestApiId: Match.anyValue(), + Schema: { + $schema: "http://json-schema.org/draft-04/schema#", + title: "pollResponse", + type: "object", + additionalProperties: false, + properties: { + textstate: { + type: "string" + }, + textgreeting: { + type: "string" + } + } + } + }); + template.hasResourceProperties("AWS::ApiGateway::Method", { + Integration: { + IntegrationHttpMethod: "POST" + }, + RequestModels: { + 'application/json': { + Ref: "testapigatewaysqstestapigatewaysqsmodelapplicationjson94EAC0E9" + }, + 'application/text': { + Ref: "testapigatewaysqstestapigatewaysqsmodelapplicationtext6A72CC47" + } + } + }); +}); \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqs-custom-method-responses.assets.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqs-custom-method-responses.assets.json index d5b3eeac7..130e7e5ab 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqs-custom-method-responses.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqs-custom-method-responses.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { - "ffcb28580155609b6742f44a39e21a4bc1428993a1c8d27ff75ccd916dc7fc83": { + "a833b41dd73a597b3f3639956815c07229fc3e8ffc7c95190083a2f2150d1741": { "source": { "path": "apisqs-custom-method-responses.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ffcb28580155609b6742f44a39e21a4bc1428993a1c8d27ff75ccd916dc7fc83.json", + "objectKey": "a833b41dd73a597b3f3639956815c07229fc3e8ffc7c95190083a2f2150d1741.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqs-custom-method-responses.template.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqs-custom-method-responses.template.json index 6885afed0..a97eeccb4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqs-custom-method-responses.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqs-custom-method-responses.template.json @@ -198,7 +198,7 @@ "Name": "RestApi" } }, - "testapigatewaysqsintegrationresponsesRestApiDeployment97492235ba12181676bc85f5ec834b0573595244": { + "testapigatewaysqsintegrationresponsesRestApiDeployment974922353e4806ac8e022d69559519d119a6f456": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "Description": "Automatically created by the RestApi construct", @@ -207,7 +207,8 @@ } }, "DependsOn": [ - "testapigatewaysqsintegrationresponsesRestApiGETD105D1F1" + "testapigatewaysqsintegrationresponsesRestApiGETD105D1F1", + "testapigatewaysqsintegrationresponsesRestApiPOSTFBB6D4FB" ], "Metadata": { "cfn_nag": { @@ -233,7 +234,7 @@ "Format": "{\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"user\":\"$context.identity.user\",\"caller\":\"$context.identity.caller\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"resourcePath\":\"$context.resourcePath\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\"}" }, "DeploymentId": { - "Ref": "testapigatewaysqsintegrationresponsesRestApiDeployment97492235ba12181676bc85f5ec834b0573595244" + "Ref": "testapigatewaysqsintegrationresponsesRestApiDeployment974922353e4806ac8e022d69559519d119a6f456" }, "MethodSettings": [ { @@ -257,6 +258,78 @@ } } }, + "testapigatewaysqsintegrationresponsesRestApiPOSTFBB6D4FB": { + "Type": "AWS::ApiGateway::Method", + "Properties": { + "AuthorizationType": "AWS_IAM", + "HttpMethod": "POST", + "Integration": { + "Credentials": { + "Fn::GetAtt": [ + "testapigatewaysqsintegrationresponsesapigatewayrole6FC88B17", + "Arn" + ] + }, + "IntegrationHttpMethod": "POST", + "IntegrationResponses": [ + { + "ResponseTemplates": { + "text/html": "OK" + }, + "StatusCode": "201" + } + ], + "PassthroughBehavior": "NEVER", + "RequestParameters": { + "integration.request.header.Content-Type": "'application/x-www-form-urlencoded'" + }, + "RequestTemplates": { + "application/json": "Action=SendMessage&MessageBody=$util.urlEncode(\"$input.body\")" + }, + "Type": "AWS", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":apigateway:", + { + "Ref": "AWS::Region" + }, + ":sqs:path/", + { + "Ref": "AWS::AccountId" + }, + "/", + { + "Fn::GetAtt": [ + "testapigatewaysqsintegrationresponsesqueueF9FA04EF", + "QueueName" + ] + } + ] + ] + } + }, + "MethodResponses": [ + { + "StatusCode": "201" + } + ], + "ResourceId": { + "Fn::GetAtt": [ + "testapigatewaysqsintegrationresponsesRestApi3BE7E402", + "RootResourceId" + ] + }, + "RestApiId": { + "Ref": "testapigatewaysqsintegrationresponsesRestApi3BE7E402" + } + } + }, "testapigatewaysqsintegrationresponsesRestApiGETD105D1F1": { "Type": "AWS::ApiGateway::Method", "Properties": { @@ -451,7 +524,10 @@ "PolicyDocument": { "Statement": [ { - "Action": "sqs:ReceiveMessage", + "Action": [ + "sqs:ReceiveMessage", + "sqs:SendMessage" + ], "Effect": "Allow", "Resource": { "Fn::GetAtt": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqscustommethodresponsesIntegDefaultTestDeployAssert1077EBE4.assets.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqscustommethodresponsesIntegDefaultTestDeployAssert1077EBE4.assets.json index 786b0edea..342effec3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqscustommethodresponsesIntegDefaultTestDeployAssert1077EBE4.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/apisqscustommethodresponsesIntegDefaultTestDeployAssert1077EBE4.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/integ.json index 846124056..00c002cd8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "apisqs-custom-method-responses/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/manifest.json index 5eb8e4a59..0a8b51a3e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "apisqscustommethodresponsesIntegDefaultTestDeployAssert1077EBE4.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "apisqscustommethodresponsesIntegDefaultTestDeployAssert1077EBE4.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "apisqs-custom-method-responses.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ffcb28580155609b6742f44a39e21a4bc1428993a1c8d27ff75ccd916dc7fc83.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a833b41dd73a597b3f3639956815c07229fc3e8ffc7c95190083a2f2150d1741.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -121,7 +123,7 @@ "/apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/RestApi/Deployment/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testapigatewaysqsintegrationresponsesRestApiDeployment97492235ba12181676bc85f5ec834b0573595244" + "data": "testapigatewaysqsintegrationresponsesRestApiDeployment974922353e4806ac8e022d69559519d119a6f456" } ], "/apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/RestApi/DeploymentStage.prod/Resource": [ @@ -136,6 +138,12 @@ "data": "testapigatewaysqsintegrationresponsesRestApiEndpointEBC579CE" } ], + "/apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/RestApi/Default/POST/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsintegrationresponsesRestApiPOSTFBB6D4FB" + } + ], "/apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/RestApi/Default/GET/Resource": [ { "type": "aws:cdk:logicalId", @@ -183,6 +191,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testapigatewaysqsintegrationresponsesRestApiDeployment97492235bc028531be7a48af2fc8610476ef0ee8": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsintegrationresponsesRestApiDeployment97492235bc028531be7a48af2fc8610476ef0ee8", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "apisqs-custom-method-responses" diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/tree.json index 5f264afe9..e492ad1f2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.js.snapshot/tree.json @@ -27,7 +27,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -110,19 +110,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.150.0" + "version": "2.160.0" } }, "queue": { @@ -149,7 +149,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -232,19 +232,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.150.0" + "version": "2.160.0" } }, "ApiAccessLogGroup": { @@ -260,13 +260,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.150.0" + "version": "2.160.0" } }, "RestApi": { @@ -289,7 +289,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.150.0" + "version": "2.160.0" } }, "Deployment": { @@ -310,13 +310,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.150.0" + "version": "2.160.0" } }, "DeploymentStage.prod": { @@ -339,7 +339,7 @@ "format": "{\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"user\":\"$context.identity.user\",\"caller\":\"$context.identity.caller\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"resourcePath\":\"$context.resourcePath\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\"}" }, "deploymentId": { - "Ref": "testapigatewaysqsintegrationresponsesRestApiDeployment97492235ba12181676bc85f5ec834b0573595244" + "Ref": "testapigatewaysqsintegrationresponsesRestApiDeployment974922353e4806ac8e022d69559519d119a6f456" }, "methodSettings": [ { @@ -358,13 +358,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.150.0" + "version": "2.160.0" } }, "Endpoint": { @@ -372,13 +372,103 @@ "path": "apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/RestApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.150.0" + "version": "2.160.0" } }, "Default": { "id": "Default", "path": "apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/RestApi/Default", "children": { + "POST": { + "id": "POST", + "path": "apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/RestApi/Default/POST", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/RestApi/Default/POST/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Method", + "aws:cdk:cloudformation:props": { + "authorizationType": "AWS_IAM", + "httpMethod": "POST", + "integration": { + "type": "AWS", + "uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":apigateway:", + { + "Ref": "AWS::Region" + }, + ":sqs:path/", + { + "Ref": "AWS::AccountId" + }, + "/", + { + "Fn::GetAtt": [ + "testapigatewaysqsintegrationresponsesqueueF9FA04EF", + "QueueName" + ] + } + ] + ] + }, + "integrationHttpMethod": "POST", + "requestParameters": { + "integration.request.header.Content-Type": "'application/x-www-form-urlencoded'" + }, + "requestTemplates": { + "application/json": "Action=SendMessage&MessageBody=$util.urlEncode(\"$input.body\")" + }, + "passthroughBehavior": "NEVER", + "integrationResponses": [ + { + "statusCode": "201", + "responseTemplates": { + "text/html": "OK" + } + } + ], + "credentials": { + "Fn::GetAtt": [ + "testapigatewaysqsintegrationresponsesapigatewayrole6FC88B17", + "Arn" + ] + } + }, + "methodResponses": [ + { + "statusCode": "201" + } + ], + "resourceId": { + "Fn::GetAtt": [ + "testapigatewaysqsintegrationresponsesRestApi3BE7E402", + "RootResourceId" + ] + }, + "restApiId": { + "Ref": "testapigatewaysqsintegrationresponsesRestApi3BE7E402" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.Method", + "version": "2.160.0" + } + }, "GET": { "id": "GET", "path": "apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/RestApi/Default/GET", @@ -463,19 +553,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.150.0" + "version": "2.160.0" } }, "UsagePlan": { @@ -503,19 +593,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.RestApi", - "version": "2.150.0" + "version": "2.160.0" } }, "LambdaRestApiCloudWatchRole": { @@ -527,7 +617,7 @@ "path": "apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.150.0" + "version": "2.160.0" } }, "Resource": { @@ -594,13 +684,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.150.0" + "version": "2.160.0" } }, "LambdaRestApiAccount": { @@ -619,7 +709,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", - "version": "2.150.0" + "version": "2.160.0" } }, "api-gateway-role": { @@ -631,7 +721,7 @@ "path": "apisqs-custom-method-responses/test-api-gateway-sqs-integration-responses/api-gateway-role/Importapi-gateway-role", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.150.0" + "version": "2.160.0" } }, "Resource": { @@ -656,7 +746,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.150.0" + "version": "2.160.0" } }, "DefaultPolicy": { @@ -672,7 +762,10 @@ "policyDocument": { "Statement": [ { - "Action": "sqs:ReceiveMessage", + "Action": [ + "sqs:ReceiveMessage", + "sqs:SendMessage" + ], "Effect": "Allow", "Resource": { "Fn::GetAtt": [ @@ -694,25 +787,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-apigateway-sqs.ApiGatewayToSqs", - "version": "2.63.0" + "version": "2.71.0" } }, "Integ": { @@ -740,7 +833,7 @@ "path": "apisqs-custom-method-responses/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.150.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -748,25 +841,25 @@ "path": "apisqs-custom-method-responses/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.150.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.150.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -774,7 +867,7 @@ "path": "apisqs-custom-method-responses/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.150.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -782,13 +875,13 @@ "path": "apisqs-custom-method-responses/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.150.0" + "version": "2.160.0" } }, "Tree": { @@ -802,7 +895,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.150.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.ts b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.ts index 4f2a01be9..7e5973ee8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.ts +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-method-responses.ts @@ -37,6 +37,18 @@ new ApiGatewayToSqs(stack, 'test-api-gateway-sqs-integration-responses', { }, { statusCode: '403' + }], + allowCreateOperation: true, + createIntegrationResponses: [ + { + statusCode: '201', + responseTemplates: { + 'text/html': 'OK' + } + } + ], + createMethodResponses: [{ + statusCode: '201' }] }); diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqs-custom-request-model.assets.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqs-custom-request-model.assets.json new file mode 100644 index 000000000..50d77665c --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqs-custom-request-model.assets.json @@ -0,0 +1,19 @@ +{ + "version": "38.0.1", + "files": { + "0194d8d93f7ef8918132d1d509ff87c71a2fb5f6ebf3228bc6533ce637e6dc22": { + "source": { + "path": "apisqs-custom-request-model.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "0194d8d93f7ef8918132d1d509ff87c71a2fb5f6ebf3228bc6533ce637e6dc22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqs-custom-request-model.template.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqs-custom-request-model.template.json new file mode 100644 index 000000000..fd6ed03e7 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqs-custom-request-model.template.json @@ -0,0 +1,709 @@ +{ + "Description": "Integration Test for aws-apigateway-sqs", + "Resources": { + "testapigatewaysqsqueuedlq8A515F77": { + "Type": "AWS::SQS::Queue", + "Properties": { + "KmsMasterKeyId": "alias/aws/sqs" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "testapigatewaysqsqueuedlqPolicyB341351F": { + "Type": "AWS::SQS::QueuePolicy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "sqs:AddPermission", + "sqs:DeleteMessage", + "sqs:GetQueueAttributes", + "sqs:ReceiveMessage", + "sqs:RemovePermission", + "sqs:SendMessage", + "sqs:SetQueueAttributes" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": { + "Fn::GetAtt": [ + "testapigatewaysqsqueuedlq8A515F77", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testapigatewaysqsqueuedlq8A515F77", + "Arn" + ] + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "Queues": [ + { + "Ref": "testapigatewaysqsqueuedlq8A515F77" + } + ] + } + }, + "testapigatewaysqsqueue8EDC3CAF": { + "Type": "AWS::SQS::Queue", + "Properties": { + "KmsMasterKeyId": "alias/aws/sqs", + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "testapigatewaysqsqueuedlq8A515F77", + "Arn" + ] + }, + "maxReceiveCount": 15 + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "testapigatewaysqsqueuePolicy8623EDE8": { + "Type": "AWS::SQS::QueuePolicy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "sqs:AddPermission", + "sqs:DeleteMessage", + "sqs:GetQueueAttributes", + "sqs:ReceiveMessage", + "sqs:RemovePermission", + "sqs:SendMessage", + "sqs:SetQueueAttributes" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": { + "Fn::GetAtt": [ + "testapigatewaysqsqueue8EDC3CAF", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testapigatewaysqsqueue8EDC3CAF", + "Arn" + ] + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "Queues": [ + { + "Ref": "testapigatewaysqsqueue8EDC3CAF" + } + ] + } + }, + "testapigatewaysqsApiAccessLogGroup37AB0350": { + "Type": "AWS::Logs::LogGroup", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain", + "Metadata": { + "cfn_nag": { + "rules_to_suppress": [ + { + "id": "W86", + "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely" + }, + { + "id": "W84", + "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)" + } + ] + } + } + }, + "testapigatewaysqsRestApi557C7EDC": { + "Type": "AWS::ApiGateway::RestApi", + "Properties": { + "EndpointConfiguration": { + "Types": [ + "EDGE" + ] + }, + "Name": "RestApi" + } + }, + "testapigatewaysqsRestApiDeploymentCA19D372a533abf5414c204f290523aaae9a51c0": { + "Type": "AWS::ApiGateway::Deployment", + "Properties": { + "Description": "Automatically created by the RestApi construct", + "RestApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + } + }, + "DependsOn": [ + "testapigatewaysqsRestApiapisqscustomrequestmodeltestapigatewaysqsRestApiPOSTValidator83A54BA4C98634F8", + "testapigatewaysqsRestApiGET4AA265C9", + "testapigatewaysqsRestApiPOST26D15DBA", + "testapigatewaysqstestapigatewaysqsmodelapplicationjson94EAC0E9", + "testapigatewaysqstestapigatewaysqsmodelapplicationtext6A72CC47" + ], + "Metadata": { + "cfn_nag": { + "rules_to_suppress": [ + { + "id": "W45", + "reason": "ApiGateway has AccessLogging enabled in AWS::ApiGateway::Stage resource, but cfn_nag checks for it in AWS::ApiGateway::Deployment resource" + } + ] + } + } + }, + "testapigatewaysqsRestApiDeploymentStageprod1C007159": { + "Type": "AWS::ApiGateway::Stage", + "Properties": { + "AccessLogSetting": { + "DestinationArn": { + "Fn::GetAtt": [ + "testapigatewaysqsApiAccessLogGroup37AB0350", + "Arn" + ] + }, + "Format": "{\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"user\":\"$context.identity.user\",\"caller\":\"$context.identity.caller\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"resourcePath\":\"$context.resourcePath\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\"}" + }, + "DeploymentId": { + "Ref": "testapigatewaysqsRestApiDeploymentCA19D372a533abf5414c204f290523aaae9a51c0" + }, + "MethodSettings": [ + { + "DataTraceEnabled": false, + "HttpMethod": "*", + "LoggingLevel": "INFO", + "ResourcePath": "/*" + } + ], + "RestApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + "StageName": "prod", + "TracingEnabled": true + }, + "Metadata": { + "guard": { + "SuppressedRules": [ + "API_GW_CACHE_ENABLED_AND_ENCRYPTED" + ] + } + } + }, + "testapigatewaysqsRestApiPOST26D15DBA": { + "Type": "AWS::ApiGateway::Method", + "Properties": { + "AuthorizationType": "AWS_IAM", + "HttpMethod": "POST", + "Integration": { + "Credentials": { + "Fn::GetAtt": [ + "testapigatewaysqsapigatewayrole07110CD6", + "Arn" + ] + }, + "IntegrationHttpMethod": "POST", + "IntegrationResponses": [ + { + "StatusCode": "200" + }, + { + "ResponseTemplates": { + "text/html": "Error" + }, + "SelectionPattern": "500", + "StatusCode": "500" + } + ], + "PassthroughBehavior": "NEVER", + "RequestParameters": { + "integration.request.header.Content-Type": "'application/x-www-form-urlencoded'" + }, + "RequestTemplates": { + "application/json": "Action=SendMessage&MessageBody=$util.urlEncode(\"$input.body\")" + }, + "Type": "AWS", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":apigateway:", + { + "Ref": "AWS::Region" + }, + ":sqs:path/", + { + "Ref": "AWS::AccountId" + }, + "/", + { + "Fn::GetAtt": [ + "testapigatewaysqsqueue8EDC3CAF", + "QueueName" + ] + } + ] + ] + } + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Content-Type": true + }, + "StatusCode": "200" + }, + { + "ResponseParameters": { + "method.response.header.Content-Type": true + }, + "StatusCode": "500" + } + ], + "RequestModels": { + "application/json": { + "Ref": "testapigatewaysqstestapigatewaysqsmodelapplicationjson94EAC0E9" + }, + "application/text": { + "Ref": "testapigatewaysqstestapigatewaysqsmodelapplicationtext6A72CC47" + } + }, + "RequestValidatorId": { + "Ref": "testapigatewaysqsRestApiapisqscustomrequestmodeltestapigatewaysqsRestApiPOSTValidator83A54BA4C98634F8" + }, + "ResourceId": { + "Fn::GetAtt": [ + "testapigatewaysqsRestApi557C7EDC", + "RootResourceId" + ] + }, + "RestApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + } + } + }, + "testapigatewaysqsRestApiGET4AA265C9": { + "Type": "AWS::ApiGateway::Method", + "Properties": { + "AuthorizationType": "AWS_IAM", + "HttpMethod": "GET", + "Integration": { + "Credentials": { + "Fn::GetAtt": [ + "testapigatewaysqsapigatewayrole07110CD6", + "Arn" + ] + }, + "IntegrationHttpMethod": "POST", + "IntegrationResponses": [ + { + "StatusCode": "200" + }, + { + "ResponseTemplates": { + "text/html": "Error" + }, + "SelectionPattern": "500", + "StatusCode": "500" + } + ], + "PassthroughBehavior": "NEVER", + "RequestParameters": { + "integration.request.header.Content-Type": "'application/x-www-form-urlencoded'" + }, + "RequestTemplates": { + "application/json": "Action=ReceiveMessage" + }, + "Type": "AWS", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":apigateway:", + { + "Ref": "AWS::Region" + }, + ":sqs:path/", + { + "Ref": "AWS::AccountId" + }, + "/", + { + "Fn::GetAtt": [ + "testapigatewaysqsqueue8EDC3CAF", + "QueueName" + ] + } + ] + ] + } + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Content-Type": true + }, + "StatusCode": "200" + }, + { + "ResponseParameters": { + "method.response.header.Content-Type": true + }, + "StatusCode": "500" + } + ], + "ResourceId": { + "Fn::GetAtt": [ + "testapigatewaysqsRestApi557C7EDC", + "RootResourceId" + ] + }, + "RestApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + } + } + }, + "testapigatewaysqsRestApiUsagePlan2295EB95": { + "Type": "AWS::ApiGateway::UsagePlan", + "Properties": { + "ApiStages": [ + { + "ApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + "Stage": { + "Ref": "testapigatewaysqsRestApiDeploymentStageprod1C007159" + }, + "Throttle": {} + } + ] + } + }, + "testapigatewaysqsRestApiapisqscustomrequestmodeltestapigatewaysqsRestApiPOSTValidator83A54BA4C98634F8": { + "Type": "AWS::ApiGateway::RequestValidator", + "Properties": { + "RestApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + "ValidateRequestBody": true + } + }, + "testapigatewaysqsLambdaRestApiCloudWatchRoleF10D0F78": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "apigateway.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:DescribeLogGroups", + "logs:DescribeLogStreams", + "logs:FilterLogEvents", + "logs:GetLogEvents", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "LambdaRestApiCloudWatchRolePolicy" + } + ] + }, + "Metadata": { + "guard": { + "SuppressedRules": [ + "IAM_NO_INLINE_POLICY_CHECK" + ] + } + } + }, + "testapigatewaysqsLambdaRestApiAccountACC6BE82": { + "Type": "AWS::ApiGateway::Account", + "Properties": { + "CloudWatchRoleArn": { + "Fn::GetAtt": [ + "testapigatewaysqsLambdaRestApiCloudWatchRoleF10D0F78", + "Arn" + ] + } + }, + "DependsOn": [ + "testapigatewaysqsRestApi557C7EDC" + ] + }, + "testapigatewaysqsapigatewayrole07110CD6": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "apigateway.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "testapigatewaysqsapigatewayroleDefaultPolicy052E7AD5": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "sqs:ReceiveMessage", + "sqs:SendMessage" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "testapigatewaysqsqueue8EDC3CAF", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "testapigatewaysqsapigatewayroleDefaultPolicy052E7AD5", + "Roles": [ + { + "Ref": "testapigatewaysqsapigatewayrole07110CD6" + } + ] + } + }, + "testapigatewaysqstestapigatewaysqsmodelapplicationjson94EAC0E9": { + "Type": "AWS::ApiGateway::Model", + "Properties": { + "ContentType": "application/json", + "RestApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + "Schema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "pollResponse", + "type": "object", + "required": [ + "state", + "greeting" + ], + "additionalProperties": false, + "properties": { + "state": { + "type": "string" + }, + "greeting": { + "type": "string" + } + } + } + } + }, + "testapigatewaysqstestapigatewaysqsmodelapplicationtext6A72CC47": { + "Type": "AWS::ApiGateway::Model", + "Properties": { + "ContentType": "application/text", + "RestApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + "Schema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "pollResponse", + "type": "object", + "additionalProperties": false, + "properties": { + "textstate": { + "type": "string" + }, + "textgreeting": { + "type": "string" + } + } + } + } + } + }, + "Outputs": { + "testapigatewaysqsRestApiEndpointD98015FF": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "testapigatewaysqsRestApiDeploymentStageprod1C007159" + }, + "/" + ] + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.assets.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.assets.json new file mode 100644 index 000000000..429ebb801 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.assets.json @@ -0,0 +1,19 @@ +{ + "version": "38.0.1", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.template.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.template.json new file mode 100644 index 000000000..ad9d0fb73 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/cdk.out new file mode 100644 index 000000000..c6e612584 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/integ.json new file mode 100644 index 000000000..efa68b8c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "38.0.1", + "testCases": { + "apisqs-custom-request-model/Integ/DefaultTest": { + "stacks": [ + "apisqs-custom-request-model" + ], + "assertionStack": "apisqs-custom-request-model/Integ/DefaultTest/DeployAssert", + "assertionStackName": "apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027" + } + } +} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/manifest.json new file mode 100644 index 000000000..c3031d97f --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/manifest.json @@ -0,0 +1,232 @@ +{ + "version": "38.0.1", + "artifacts": { + "apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "notificationArns": [], + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "apisqscustomrequestmodelIntegDefaultTestDeployAssert2EE4B027.assets" + ], + "metadata": { + "/apisqs-custom-request-model/Integ/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/apisqs-custom-request-model/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "apisqs-custom-request-model/Integ/DefaultTest/DeployAssert" + }, + "apisqs-custom-request-model.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "apisqs-custom-request-model.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "apisqs-custom-request-model": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "apisqs-custom-request-model.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "notificationArns": [], + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0194d8d93f7ef8918132d1d509ff87c71a2fb5f6ebf3228bc6533ce637e6dc22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "apisqs-custom-request-model.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "apisqs-custom-request-model.assets" + ], + "metadata": { + "/apisqs-custom-request-model/test-api-gateway-sqs/queue-dlq/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsqueuedlq8A515F77" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/queue-dlq/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsqueuedlqPolicyB341351F" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/queue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsqueue8EDC3CAF" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/queue/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsqueuePolicy8623EDE8" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/ApiAccessLogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsApiAccessLogGroup37AB0350" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsRestApi557C7EDC" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Deployment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsRestApiDeploymentCA19D372a533abf5414c204f290523aaae9a51c0" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/RestApi/DeploymentStage.prod/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsRestApiDeploymentStageprod1C007159" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Endpoint": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsRestApiEndpointD98015FF" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Default/POST/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsRestApiPOST26D15DBA" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Default/GET/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsRestApiGET4AA265C9" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/RestApi/UsagePlan/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsRestApiUsagePlan2295EB95" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/RestApi/apisqscustomrequestmodeltestapigatewaysqsRestApiPOSTValidator83A54BA4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsRestApiapisqscustomrequestmodeltestapigatewaysqsRestApiPOSTValidator83A54BA4C98634F8" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/LambdaRestApiCloudWatchRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsLambdaRestApiCloudWatchRoleF10D0F78" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/LambdaRestApiAccount": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsLambdaRestApiAccountACC6BE82" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/api-gateway-role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsapigatewayrole07110CD6" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/api-gateway-role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsapigatewayroleDefaultPolicy052E7AD5" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/test-api-gateway-sqs-model-applicationjson/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqstestapigatewaysqsmodelapplicationjson94EAC0E9" + } + ], + "/apisqs-custom-request-model/test-api-gateway-sqs/test-api-gateway-sqs-model-applicationtext/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqstestapigatewaysqsmodelapplicationtext6A72CC47" + } + ], + "/apisqs-custom-request-model/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/apisqs-custom-request-model/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ], + "testapigatewaysqsRestApiDeploymentCA19D3729ed4c2c9e3bb9d0e8c5b1e8d0c261087": [ + { + "type": "aws:cdk:logicalId", + "data": "testapigatewaysqsRestApiDeploymentCA19D3729ed4c2c9e3bb9d0e8c5b1e8d0c261087", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ] + }, + "displayName": "apisqs-custom-request-model" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/tree.json new file mode 100644 index 000000000..6d9214ba7 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.js.snapshot/tree.json @@ -0,0 +1,1056 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "apisqs-custom-request-model": { + "id": "apisqs-custom-request-model", + "path": "apisqs-custom-request-model", + "children": { + "test-api-gateway-sqs": { + "id": "test-api-gateway-sqs", + "path": "apisqs-custom-request-model/test-api-gateway-sqs", + "children": { + "queue-dlq": { + "id": "queue-dlq", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/queue-dlq", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/queue-dlq/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "kmsMasterKeyId": "alias/aws/sqs" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", + "version": "2.160.0" + } + }, + "Policy": { + "id": "Policy", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/queue-dlq/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/queue-dlq/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "sqs:AddPermission", + "sqs:DeleteMessage", + "sqs:GetQueueAttributes", + "sqs:ReceiveMessage", + "sqs:RemovePermission", + "sqs:SendMessage", + "sqs:SetQueueAttributes" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": { + "Fn::GetAtt": [ + "testapigatewaysqsqueuedlq8A515F77", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testapigatewaysqsqueuedlq8A515F77", + "Arn" + ] + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "queues": [ + { + "Ref": "testapigatewaysqsqueuedlq8A515F77" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "2.160.0" + } + }, + "queue": { + "id": "queue", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/queue", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/queue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "kmsMasterKeyId": "alias/aws/sqs", + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "testapigatewaysqsqueuedlq8A515F77", + "Arn" + ] + }, + "maxReceiveCount": 15 + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", + "version": "2.160.0" + } + }, + "Policy": { + "id": "Policy", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/queue/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/queue/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "sqs:AddPermission", + "sqs:DeleteMessage", + "sqs:GetQueueAttributes", + "sqs:ReceiveMessage", + "sqs:RemovePermission", + "sqs:SendMessage", + "sqs:SetQueueAttributes" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": { + "Fn::GetAtt": [ + "testapigatewaysqsqueue8EDC3CAF", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testapigatewaysqsqueue8EDC3CAF", + "Arn" + ] + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "queues": [ + { + "Ref": "testapigatewaysqsqueue8EDC3CAF" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "2.160.0" + } + }, + "ApiAccessLogGroup": { + "id": "ApiAccessLogGroup", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/ApiAccessLogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/ApiAccessLogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_logs.LogGroup", + "version": "2.160.0" + } + }, + "RestApi": { + "id": "RestApi", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::RestApi", + "aws:cdk:cloudformation:props": { + "endpointConfiguration": { + "types": [ + "EDGE" + ] + }, + "name": "RestApi" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", + "version": "2.160.0" + } + }, + "Deployment": { + "id": "Deployment", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Deployment", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Deployment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Deployment", + "aws:cdk:cloudformation:props": { + "description": "Automatically created by the RestApi construct", + "restApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.Deployment", + "version": "2.160.0" + } + }, + "DeploymentStage.prod": { + "id": "DeploymentStage.prod", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/DeploymentStage.prod", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/DeploymentStage.prod/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Stage", + "aws:cdk:cloudformation:props": { + "accessLogSetting": { + "destinationArn": { + "Fn::GetAtt": [ + "testapigatewaysqsApiAccessLogGroup37AB0350", + "Arn" + ] + }, + "format": "{\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"user\":\"$context.identity.user\",\"caller\":\"$context.identity.caller\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"resourcePath\":\"$context.resourcePath\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\"}" + }, + "deploymentId": { + "Ref": "testapigatewaysqsRestApiDeploymentCA19D372a533abf5414c204f290523aaae9a51c0" + }, + "methodSettings": [ + { + "httpMethod": "*", + "resourcePath": "/*", + "dataTraceEnabled": false, + "loggingLevel": "INFO" + } + ], + "restApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + "stageName": "prod", + "tracingEnabled": true + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.Stage", + "version": "2.160.0" + } + }, + "Endpoint": { + "id": "Endpoint", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Endpoint", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "2.160.0" + } + }, + "Default": { + "id": "Default", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Default", + "children": { + "POST": { + "id": "POST", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Default/POST", + "children": { + "Validator": { + "id": "Validator", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Default/POST/Validator", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Default/POST/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Method", + "aws:cdk:cloudformation:props": { + "authorizationType": "AWS_IAM", + "httpMethod": "POST", + "integration": { + "type": "AWS", + "uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":apigateway:", + { + "Ref": "AWS::Region" + }, + ":sqs:path/", + { + "Ref": "AWS::AccountId" + }, + "/", + { + "Fn::GetAtt": [ + "testapigatewaysqsqueue8EDC3CAF", + "QueueName" + ] + } + ] + ] + }, + "integrationHttpMethod": "POST", + "requestParameters": { + "integration.request.header.Content-Type": "'application/x-www-form-urlencoded'" + }, + "requestTemplates": { + "application/json": "Action=SendMessage&MessageBody=$util.urlEncode(\"$input.body\")" + }, + "passthroughBehavior": "NEVER", + "integrationResponses": [ + { + "statusCode": "200" + }, + { + "statusCode": "500", + "responseTemplates": { + "text/html": "Error" + }, + "selectionPattern": "500" + } + ], + "credentials": { + "Fn::GetAtt": [ + "testapigatewaysqsapigatewayrole07110CD6", + "Arn" + ] + } + }, + "methodResponses": [ + { + "statusCode": "200", + "responseParameters": { + "method.response.header.Content-Type": true + } + }, + { + "statusCode": "500", + "responseParameters": { + "method.response.header.Content-Type": true + } + } + ], + "requestModels": { + "application/json": { + "Ref": "testapigatewaysqstestapigatewaysqsmodelapplicationjson94EAC0E9" + }, + "application/text": { + "Ref": "testapigatewaysqstestapigatewaysqsmodelapplicationtext6A72CC47" + } + }, + "requestValidatorId": { + "Ref": "testapigatewaysqsRestApiapisqscustomrequestmodeltestapigatewaysqsRestApiPOSTValidator83A54BA4C98634F8" + }, + "resourceId": { + "Fn::GetAtt": [ + "testapigatewaysqsRestApi557C7EDC", + "RootResourceId" + ] + }, + "restApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.Method", + "version": "2.160.0" + } + }, + "GET": { + "id": "GET", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Default/GET", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/Default/GET/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Method", + "aws:cdk:cloudformation:props": { + "authorizationType": "AWS_IAM", + "httpMethod": "GET", + "integration": { + "type": "AWS", + "uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":apigateway:", + { + "Ref": "AWS::Region" + }, + ":sqs:path/", + { + "Ref": "AWS::AccountId" + }, + "/", + { + "Fn::GetAtt": [ + "testapigatewaysqsqueue8EDC3CAF", + "QueueName" + ] + } + ] + ] + }, + "integrationHttpMethod": "POST", + "requestParameters": { + "integration.request.header.Content-Type": "'application/x-www-form-urlencoded'" + }, + "requestTemplates": { + "application/json": "Action=ReceiveMessage" + }, + "passthroughBehavior": "NEVER", + "integrationResponses": [ + { + "statusCode": "200" + }, + { + "statusCode": "500", + "responseTemplates": { + "text/html": "Error" + }, + "selectionPattern": "500" + } + ], + "credentials": { + "Fn::GetAtt": [ + "testapigatewaysqsapigatewayrole07110CD6", + "Arn" + ] + } + }, + "methodResponses": [ + { + "statusCode": "200", + "responseParameters": { + "method.response.header.Content-Type": true + } + }, + { + "statusCode": "500", + "responseParameters": { + "method.response.header.Content-Type": true + } + } + ], + "resourceId": { + "Fn::GetAtt": [ + "testapigatewaysqsRestApi557C7EDC", + "RootResourceId" + ] + }, + "restApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.Method", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", + "version": "2.160.0" + } + }, + "UsagePlan": { + "id": "UsagePlan", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/UsagePlan", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/UsagePlan/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::UsagePlan", + "aws:cdk:cloudformation:props": { + "apiStages": [ + { + "apiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + "stage": { + "Ref": "testapigatewaysqsRestApiDeploymentStageprod1C007159" + }, + "throttle": {} + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", + "version": "2.160.0" + } + }, + "apisqscustomrequestmodeltestapigatewaysqsRestApiPOSTValidator83A54BA4": { + "id": "apisqscustomrequestmodeltestapigatewaysqsRestApiPOSTValidator83A54BA4", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/apisqscustomrequestmodeltestapigatewaysqsRestApiPOSTValidator83A54BA4", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/RestApi/apisqscustomrequestmodeltestapigatewaysqsRestApiPOSTValidator83A54BA4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::RequestValidator", + "aws:cdk:cloudformation:props": { + "restApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + "validateRequestBody": true + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnRequestValidator", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.RequestValidator", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.RestApi", + "version": "2.160.0" + } + }, + "LambdaRestApiCloudWatchRole": { + "id": "LambdaRestApiCloudWatchRole", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/LambdaRestApiCloudWatchRole", + "children": { + "ImportLambdaRestApiCloudWatchRole": { + "id": "ImportLambdaRestApiCloudWatchRole", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "2.160.0" + } + }, + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/LambdaRestApiCloudWatchRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "apigateway.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "policies": [ + { + "policyName": "LambdaRestApiCloudWatchRolePolicy", + "policyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:DescribeLogGroups", + "logs:DescribeLogStreams", + "logs:FilterLogEvents", + "logs:GetLogEvents", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + ], + "Version": "2012-10-17" + } + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "2.160.0" + } + }, + "LambdaRestApiAccount": { + "id": "LambdaRestApiAccount", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/LambdaRestApiAccount", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Account", + "aws:cdk:cloudformation:props": { + "cloudWatchRoleArn": { + "Fn::GetAtt": [ + "testapigatewaysqsLambdaRestApiCloudWatchRoleF10D0F78", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", + "version": "2.160.0" + } + }, + "api-gateway-role": { + "id": "api-gateway-role", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/api-gateway-role", + "children": { + "Importapi-gateway-role": { + "id": "Importapi-gateway-role", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/api-gateway-role/Importapi-gateway-role", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "2.160.0" + } + }, + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/api-gateway-role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "apigateway.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "2.160.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/api-gateway-role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/api-gateway-role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "sqs:ReceiveMessage", + "sqs:SendMessage" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "testapigatewaysqsqueue8EDC3CAF", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "testapigatewaysqsapigatewayroleDefaultPolicy052E7AD5", + "roles": [ + { + "Ref": "testapigatewaysqsapigatewayrole07110CD6" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "2.160.0" + } + }, + "test-api-gateway-sqs-model-applicationjson": { + "id": "test-api-gateway-sqs-model-applicationjson", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/test-api-gateway-sqs-model-applicationjson", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/test-api-gateway-sqs-model-applicationjson/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Model", + "aws:cdk:cloudformation:props": { + "contentType": "application/json", + "restApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + "schema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "pollResponse", + "type": "object", + "required": [ + "state", + "greeting" + ], + "additionalProperties": false, + "properties": { + "state": { + "type": "string" + }, + "greeting": { + "type": "string" + } + } + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnModel", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.Model", + "version": "2.160.0" + } + }, + "test-api-gateway-sqs-model-applicationtext": { + "id": "test-api-gateway-sqs-model-applicationtext", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/test-api-gateway-sqs-model-applicationtext", + "children": { + "Resource": { + "id": "Resource", + "path": "apisqs-custom-request-model/test-api-gateway-sqs/test-api-gateway-sqs-model-applicationtext/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Model", + "aws:cdk:cloudformation:props": { + "contentType": "application/text", + "restApiId": { + "Ref": "testapigatewaysqsRestApi557C7EDC" + }, + "schema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "pollResponse", + "type": "object", + "additionalProperties": false, + "properties": { + "textstate": { + "type": "string" + }, + "textgreeting": { + "type": "string" + } + } + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.CfnModel", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_apigateway.Model", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Integ": { + "id": "Integ", + "path": "apisqs-custom-request-model/Integ", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "apisqs-custom-request-model/Integ/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "apisqs-custom-request-model/Integ/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "apisqs-custom-request-model/Integ/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "apisqs-custom-request-model/Integ/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "2.160.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "apisqs-custom-request-model/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "2.160.0-alpha.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "2.160.0-alpha.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "apisqs-custom-request-model/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "2.160.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "apisqs-custom-request-model/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "2.160.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "2.160.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "2.160.0" + } + } +} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.ts b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.ts new file mode 100644 index 000000000..e8d36a568 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apisqs-custom-request-model.ts @@ -0,0 +1,58 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance + * with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES + * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions + * and limitations under the License. + */ + +// Imports +import { App, Stack } from "aws-cdk-lib"; +import { ApiGatewayToSqs, ApiGatewayToSqsProps } from "../lib"; +import { generateIntegStackName } from '@aws-solutions-constructs/core'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as api from 'aws-cdk-lib/aws-apigateway'; +// Setup +const app = new App(); +const stack = new Stack(app, generateIntegStackName(__filename)); +stack.templateOptions.description = 'Integration Test for aws-apigateway-sqs'; + +// Definitions +const props: ApiGatewayToSqsProps = { + allowCreateOperation: true, + messageSchema: { + "application/json": { + schema: api.JsonSchemaVersion.DRAFT4, + title: 'pollResponse', + type: api.JsonSchemaType.OBJECT, + required: ['state', 'greeting'], + additionalProperties: false, + properties: { + state: { type: api.JsonSchemaType.STRING }, + greeting: { type: api.JsonSchemaType.STRING } + } + }, + "application/text": { + schema: api.JsonSchemaVersion.DRAFT4, + title: 'pollResponse', + type: api.JsonSchemaType.OBJECT, + additionalProperties: false, + properties: { + textstate: { type: api.JsonSchemaType.STRING }, + textgreeting: { type: api.JsonSchemaType.STRING } + } + } + } +}; + +new ApiGatewayToSqs(stack, 'test-api-gateway-sqs', props); + +// Synth +new IntegTest(stack, 'Integ', { testCases: [ + stack +] }); diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/lib/index.ts index b6d546cf6..54ef46dd3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/lib/index.ts @@ -200,7 +200,7 @@ export class CloudFrontToS3 extends Construct { resources: [originBucket.arnForObjects('*')], conditions: { StringEquals: { - 'AWS:SourceArn': `arn:aws:cloudfront::${Aws.ACCOUNT_ID}:distribution/${this.cloudFrontWebDistribution.distributionId}` + 'AWS:SourceArn': `arn:${Aws.PARTITION}:cloudfront::${Aws.ACCOUNT_ID}:distribution/${this.cloudFrontWebDistribution.distributionId}` } } }) diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/cfn-response.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/cfn-response.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/cfn-response.js rename to source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/cfn-response.js diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/consts.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/consts.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/consts.js rename to source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/consts.js diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/framework.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/framework.js new file mode 100644 index 000000000..952048e6f --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/framework.js @@ -0,0 +1,3 @@ +"use strict";const cfnResponse=require("./cfn-response"),consts=require("./consts"),outbound_1=require("./outbound"),util_1=require("./util");async function onEvent(cfnRequest){const sanitizedRequest={...cfnRequest,ResponseURL:"..."};(0,util_1.log)("onEventHandler",sanitizedRequest),cfnRequest.ResourceProperties=cfnRequest.ResourceProperties||{};const onEventResult=await invokeUserFunction(consts.USER_ON_EVENT_FUNCTION_ARN_ENV,sanitizedRequest,cfnRequest.ResponseURL);onEventResult?.NoEcho?(0,util_1.log)("redacted onEvent returned:",cfnResponse.redactDataFromPayload(onEventResult)):(0,util_1.log)("onEvent returned:",onEventResult);const resourceEvent=createResponseEvent(cfnRequest,onEventResult),sanitizedEvent={...resourceEvent,ResponseURL:"..."};if(onEventResult?.NoEcho?(0,util_1.log)("readacted event:",cfnResponse.redactDataFromPayload(sanitizedEvent)):(0,util_1.log)("event:",sanitizedEvent),!process.env[consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV])return cfnResponse.submitResponse("SUCCESS",resourceEvent,{noEcho:resourceEvent.NoEcho});const waiter={stateMachineArn:(0,util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV),name:resourceEvent.RequestId,input:JSON.stringify(resourceEvent)};(0,util_1.log)("starting waiter",{stateMachineArn:(0,util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV),name:resourceEvent.RequestId}),await(0,outbound_1.startExecution)(waiter)}async function isComplete(event){const sanitizedRequest={...event,ResponseURL:"..."};event?.NoEcho?(0,util_1.log)("redacted isComplete request",cfnResponse.redactDataFromPayload(sanitizedRequest)):(0,util_1.log)("isComplete",sanitizedRequest);const isCompleteResult=await invokeUserFunction(consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV,sanitizedRequest,event.ResponseURL);if(event?.NoEcho?(0,util_1.log)("redacted user isComplete returned:",cfnResponse.redactDataFromPayload(isCompleteResult)):(0,util_1.log)("user isComplete returned:",isCompleteResult),!isCompleteResult.IsComplete)throw isCompleteResult.Data&&Object.keys(isCompleteResult.Data).length>0?new Error('"Data" is not allowed if "IsComplete" is "False"'):new cfnResponse.Retry(JSON.stringify(event));const response={...event,...isCompleteResult,Data:{...event.Data,...isCompleteResult.Data}};await cfnResponse.submitResponse("SUCCESS",response,{noEcho:event.NoEcho})}async function onTimeout(timeoutEvent){(0,util_1.log)("timeoutHandler",timeoutEvent);const isCompleteRequest=JSON.parse(JSON.parse(timeoutEvent.Cause).errorMessage);await cfnResponse.submitResponse("FAILED",isCompleteRequest,{reason:"Operation timed out"})}async function invokeUserFunction(functionArnEnv,sanitizedPayload,responseUrl){const functionArn=(0,util_1.getEnv)(functionArnEnv);(0,util_1.log)(`executing user function ${functionArn} with payload`,sanitizedPayload);const resp=await(0,outbound_1.invokeFunction)({FunctionName:functionArn,Payload:JSON.stringify({...sanitizedPayload,ResponseURL:responseUrl})});(0,util_1.log)("user function response:",resp,typeof resp);const jsonPayload=(0,util_1.parseJsonPayload)(resp.Payload);if(resp.FunctionError){(0,util_1.log)("user function threw an error:",resp.FunctionError);const errorMessage=jsonPayload.errorMessage||"error",arn=functionArn.split(":"),functionName=arn[arn.length-1],message=[errorMessage,"",`Logs: /aws/lambda/${functionName}`,""].join(` +`),e=new Error(message);throw jsonPayload.trace&&(e.stack=[message,...jsonPayload.trace.slice(1)].join(` +`)),e}return jsonPayload}function createResponseEvent(cfnRequest,onEventResult){onEventResult=onEventResult||{};const physicalResourceId=onEventResult.PhysicalResourceId||defaultPhysicalResourceId(cfnRequest);if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}" during deletion`);return cfnRequest.RequestType==="Update"&&physicalResourceId!==cfnRequest.PhysicalResourceId&&(0,util_1.log)(`UPDATE: changing physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}"`),{...cfnRequest,...onEventResult,PhysicalResourceId:physicalResourceId}}function defaultPhysicalResourceId(req){switch(req.RequestType){case"Create":return req.RequestId;case"Update":case"Delete":return req.PhysicalResourceId;default:throw new Error(`Invalid "RequestType" in request "${JSON.stringify(req)}"`)}}module.exports={[consts.FRAMEWORK_ON_EVENT_HANDLER_NAME]:cfnResponse.safeHandler(onEvent),[consts.FRAMEWORK_IS_COMPLETE_HANDLER_NAME]:cfnResponse.safeHandler(isComplete),[consts.FRAMEWORK_ON_TIMEOUT_HANDLER_NAME]:onTimeout}; diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/outbound.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/outbound.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/outbound.js rename to source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/outbound.js diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/util.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/util.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/util.js rename to source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/util.js diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/framework.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/framework.js deleted file mode 100644 index 42ca4b146..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/framework.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";const cfnResponse=require("./cfn-response"),consts=require("./consts"),outbound_1=require("./outbound"),util_1=require("./util");async function onEvent(cfnRequest){const sanitizedRequest={...cfnRequest,ResponseURL:"..."};(0,util_1.log)("onEventHandler",sanitizedRequest),cfnRequest.ResourceProperties=cfnRequest.ResourceProperties||{};const onEventResult=await invokeUserFunction(consts.USER_ON_EVENT_FUNCTION_ARN_ENV,sanitizedRequest,cfnRequest.ResponseURL);onEventResult?.NoEcho?(0,util_1.log)("redacted onEvent returned:",cfnResponse.redactDataFromPayload(onEventResult)):(0,util_1.log)("onEvent returned:",onEventResult);const resourceEvent=createResponseEvent(cfnRequest,onEventResult);if(onEventResult?.NoEcho?(0,util_1.log)("readacted event:",cfnResponse.redactDataFromPayload(resourceEvent)):(0,util_1.log)("event:",resourceEvent),!process.env[consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV])return cfnResponse.submitResponse("SUCCESS",resourceEvent,{noEcho:resourceEvent.NoEcho});const waiter={stateMachineArn:(0,util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV),name:resourceEvent.RequestId,input:JSON.stringify(resourceEvent)};(0,util_1.log)("starting waiter",{stateMachineArn:(0,util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV),name:resourceEvent.RequestId}),await(0,outbound_1.startExecution)(waiter)}async function isComplete(event){const sanitizedRequest={...event,ResponseURL:"..."};event?.NoEcho?(0,util_1.log)("redacted isComplete request",cfnResponse.redactDataFromPayload(sanitizedRequest)):(0,util_1.log)("isComplete",sanitizedRequest);const isCompleteResult=await invokeUserFunction(consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV,sanitizedRequest,event.ResponseURL);if(event?.NoEcho?(0,util_1.log)("redacted user isComplete returned:",cfnResponse.redactDataFromPayload(isCompleteResult)):(0,util_1.log)("user isComplete returned:",isCompleteResult),!isCompleteResult.IsComplete)throw isCompleteResult.Data&&Object.keys(isCompleteResult.Data).length>0?new Error('"Data" is not allowed if "IsComplete" is "False"'):new cfnResponse.Retry(JSON.stringify(event));const response={...event,...isCompleteResult,Data:{...event.Data,...isCompleteResult.Data}};await cfnResponse.submitResponse("SUCCESS",response,{noEcho:event.NoEcho})}async function onTimeout(timeoutEvent){(0,util_1.log)("timeoutHandler",timeoutEvent);const isCompleteRequest=JSON.parse(JSON.parse(timeoutEvent.Cause).errorMessage);await cfnResponse.submitResponse("FAILED",isCompleteRequest,{reason:"Operation timed out"})}async function invokeUserFunction(functionArnEnv,sanitizedPayload,responseUrl){const functionArn=(0,util_1.getEnv)(functionArnEnv);(0,util_1.log)(`executing user function ${functionArn} with payload`,sanitizedPayload);const resp=await(0,outbound_1.invokeFunction)({FunctionName:functionArn,Payload:JSON.stringify({...sanitizedPayload,ResponseURL:responseUrl})});(0,util_1.log)("user function response:",resp,typeof resp);const jsonPayload=(0,util_1.parseJsonPayload)(resp.Payload);if(resp.FunctionError){(0,util_1.log)("user function threw an error:",resp.FunctionError);const errorMessage=jsonPayload.errorMessage||"error",arn=functionArn.split(":"),functionName=arn[arn.length-1],message=[errorMessage,"",`Logs: /aws/lambda/${functionName}`,""].join(` -`),e=new Error(message);throw jsonPayload.trace&&(e.stack=[message,...jsonPayload.trace.slice(1)].join(` -`)),e}return jsonPayload}function createResponseEvent(cfnRequest,onEventResult){onEventResult=onEventResult||{};const physicalResourceId=onEventResult.PhysicalResourceId||defaultPhysicalResourceId(cfnRequest);if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}" during deletion`);return cfnRequest.RequestType==="Update"&&physicalResourceId!==cfnRequest.PhysicalResourceId&&(0,util_1.log)(`UPDATE: changing physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}"`),{...cfnRequest,...onEventResult,PhysicalResourceId:physicalResourceId}}function defaultPhysicalResourceId(req){switch(req.RequestType){case"Create":return req.RequestId;case"Update":case"Delete":return req.PhysicalResourceId;default:throw new Error(`Invalid "RequestType" in request "${JSON.stringify(req)}"`)}}module.exports={[consts.FRAMEWORK_ON_EVENT_HANDLER_NAME]:cfnResponse.safeHandler(onEvent),[consts.FRAMEWORK_IS_COMPLETE_HANDLER_NAME]:cfnResponse.safeHandler(isComplete),[consts.FRAMEWORK_ON_TIMEOUT_HANDLER_NAME]:onTimeout}; diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json index 1594d3351..ee58319e3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -27,20 +27,20 @@ } } }, - "d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b": { + "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e": { "source": { - "path": "asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b", + "path": "asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b.zip", + "objectKey": "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "50c7d9e0a9234aca2de6f18b943dbbf72f52508e5ea0c9d78abf42ddfa193438": { + "1cc201d973b7f73bd9be614c5da0115efe0f1773ec57534801d543cf2f3c6a51": { "source": { "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "50c7d9e0a9234aca2de6f18b943dbbf72f52508e5ea0c9d78abf42ddfa193438.json", + "objectKey": "1cc201d973b7f73bd9be614c5da0115efe0f1773ec57534801d543cf2f3c6a51.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json index 8c5455ca1..f61aebb96 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json @@ -447,7 +447,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -1187,7 +1191,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b.zip" + "S3Key": "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e.zip" }, "Description": "AWS CDK resource provider framework - onEvent (cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider)", "Environment": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithcmkprovidedasexistingbucketIntegDefaultTestDeployAssertF6031114.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithcmkprovidedasexistingbucketIntegDefaultTestDeployAssertF6031114.assets.json index e13d50ff5..bda4bc254 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithcmkprovidedasexistingbucketIntegDefaultTestDeployAssertF6031114.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithcmkprovidedasexistingbucketIntegDefaultTestDeployAssertF6031114.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/integ.json index 3fc7d5a0f..48b913e2a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json index 9d09ecca3..6c7ef3823 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3bucketencryptedwithcmkprovidedasexistingbucketIntegDefaultTestDeployAssertF6031114.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3bucketencryptedwithcmkprovidedasexistingbucketIntegDefaultTestDeployAssertF6031114.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/50c7d9e0a9234aca2de6f18b943dbbf72f52508e5ea0c9d78abf42ddfa193438.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1cc201d973b7f73bd9be614c5da0115efe0f1773ec57534801d543cf2f3c6a51.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -112,6 +114,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json index 328568a6a..b764ecd27 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json @@ -51,13 +51,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.150.0" + "version": "2.160.0" } }, "existing-s3-bucket-encrypted-with-cmkS3LoggingBucket": { @@ -98,7 +98,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -232,13 +232,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -250,19 +250,19 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/existing-s3-bucket-encrypted-with-cmkS3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.150.0" + "version": "2.160.0" } }, "LatestNodeRuntimeMap": { @@ -270,7 +270,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.150.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -282,7 +282,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.150.0" + "version": "2.160.0" } }, "Role": { @@ -290,7 +290,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } }, "Handler": { @@ -298,13 +298,13 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.150.0" + "version": "2.160.0" } }, "existing-s3-bucket-encrypted-with-cmkS3Bucket": { @@ -369,7 +369,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -468,7 +468,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -507,13 +511,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -525,19 +529,19 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/existing-s3-bucket-encrypted-with-cmkS3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.150.0" + "version": "2.160.0" } }, "test-cloudfront-s3-cmk-encryption-key": { @@ -582,7 +586,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -716,13 +720,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -734,19 +738,19 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.150.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucket": { @@ -799,7 +803,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -897,13 +901,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -915,19 +919,19 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.150.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -967,7 +971,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.150.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -1027,13 +1031,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.150.0" + "version": "2.160.0" } }, "LambdaFunctionServiceRole": { @@ -1045,7 +1049,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.150.0" + "version": "2.160.0" } }, "Resource": { @@ -1108,7 +1112,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.150.0" + "version": "2.160.0" } }, "DefaultPolicy": { @@ -1144,19 +1148,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.150.0" + "version": "2.160.0" } }, "LambdaFunction": { @@ -1172,7 +1176,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.150.0" + "version": "2.160.0" } }, "AssetBucket": { @@ -1180,13 +1184,13 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.150.0" + "version": "2.160.0" } }, "Resource": { @@ -1222,13 +1226,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.150.0" + "version": "2.160.0" } }, "test-cloudfront-s3-cmk-encryption-keyResourceCmkPolicy": { @@ -1270,13 +1274,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.150.0" + "version": "2.160.0" } }, "KmsKeyPolicyUpdateProvider": { @@ -1296,7 +1300,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.150.0" + "version": "2.160.0" } }, "Resource": { @@ -1335,7 +1339,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.150.0" + "version": "2.160.0" } }, "DefaultPolicy": { @@ -1389,19 +1393,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.150.0" + "version": "2.160.0" } }, "Code": { @@ -1413,7 +1417,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.150.0" + "version": "2.160.0" } }, "AssetBucket": { @@ -1421,13 +1425,13 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.150.0" + "version": "2.160.0" } }, "Resource": { @@ -1440,7 +1444,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b.zip" + "s3Key": "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e.zip" }, "description": "AWS CDK resource provider framework - onEvent (cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider)", "environment": { @@ -1474,19 +1478,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "2.150.0" + "version": "2.160.0" } }, "KmsKeyPolicyUpdater": { @@ -1498,19 +1502,19 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdater/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.63.0" + "version": "2.71.0" } }, "Integ": { @@ -1538,7 +1542,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.150.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1546,25 +1550,25 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.150.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.150.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -1572,7 +1576,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.150.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1580,13 +1584,13 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.150.0" + "version": "2.160.0" } }, "Tree": { @@ -1600,7 +1604,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.150.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.assets.json index 91dfcf47e..4f95cf161 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -14,7 +14,7 @@ } } }, - "610a9f96763e71a36144d02b6a282132461f958137d7f830085f89b26e0fca93": { + "a19c7e27a7bb089090dde0e096b4e31a89bdb3b94abe033041e486d6029d6829": { "source": { "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "610a9f96763e71a36144d02b6a282132461f958137d7f830085f89b26e0fca93.json", + "objectKey": "a19c7e27a7bb089090dde0e096b4e31a89bdb3b94abe033041e486d6029d6829.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json index 8721e621e..73fd704fe 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json @@ -405,7 +405,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithmanagedkeyprovidedasexistingbucketIntegDefaultTestDeployAssert03A82C16.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithmanagedkeyprovidedasexistingbucketIntegDefaultTestDeployAssert03A82C16.assets.json index 879f040c5..7e3e867e6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithmanagedkeyprovidedasexistingbucketIntegDefaultTestDeployAssert03A82C16.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3bucketencryptedwithmanagedkeyprovidedasexistingbucketIntegDefaultTestDeployAssert03A82C16.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/integ.json index 38b199bd7..f7cb4666c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json index 86777c325..6671410ed 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3bucketencryptedwithmanagedkeyprovidedasexistingbucketIntegDefaultTestDeployAssert03A82C16.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3bucketencryptedwithmanagedkeyprovidedasexistingbucketIntegDefaultTestDeployAssert03A82C16.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/610a9f96763e71a36144d02b6a282132461f958137d7f830085f89b26e0fca93.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a19c7e27a7bb089090dde0e096b4e31a89bdb3b94abe033041e486d6029d6829.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -106,6 +108,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json index c5103e3e6..9e48c73cd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json @@ -46,7 +46,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -180,13 +180,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -198,19 +198,19 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/existing-s3-bucket-encrypted-with-s3-managed-keyS3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "LatestNodeRuntimeMap": { @@ -218,7 +218,7 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.149.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -230,7 +230,7 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.149.0" + "version": "2.160.0" } }, "Role": { @@ -238,7 +238,7 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } }, "Handler": { @@ -246,13 +246,13 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.149.0" + "version": "2.160.0" } }, "existing-s3-bucket-encrypted-with-s3-managed-keyS3Bucket": { @@ -311,7 +311,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -410,7 +410,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -449,13 +453,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -467,19 +471,19 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/existing-s3-bucket-encrypted-with-s3-managed-keyS3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "test-cloudfront-s3-managed-key": { @@ -524,7 +528,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -658,13 +662,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -676,19 +680,19 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/test-cloudfront-s3-managed-key/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucket": { @@ -741,7 +745,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -839,13 +843,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -857,19 +861,19 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/test-cloudfront-s3-managed-key/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -909,7 +913,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -969,19 +973,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.62.0" + "version": "2.71.0" } }, "Integ": { @@ -1009,7 +1013,7 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1017,25 +1021,25 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -1043,7 +1047,7 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1051,13 +1055,13 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } }, "Tree": { @@ -1071,7 +1075,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.149.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/cfn-response.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/cfn-response.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/cfn-response.js rename to source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/cfn-response.js diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/consts.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/consts.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/consts.js rename to source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/consts.js diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/framework.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/framework.js new file mode 100644 index 000000000..952048e6f --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/framework.js @@ -0,0 +1,3 @@ +"use strict";const cfnResponse=require("./cfn-response"),consts=require("./consts"),outbound_1=require("./outbound"),util_1=require("./util");async function onEvent(cfnRequest){const sanitizedRequest={...cfnRequest,ResponseURL:"..."};(0,util_1.log)("onEventHandler",sanitizedRequest),cfnRequest.ResourceProperties=cfnRequest.ResourceProperties||{};const onEventResult=await invokeUserFunction(consts.USER_ON_EVENT_FUNCTION_ARN_ENV,sanitizedRequest,cfnRequest.ResponseURL);onEventResult?.NoEcho?(0,util_1.log)("redacted onEvent returned:",cfnResponse.redactDataFromPayload(onEventResult)):(0,util_1.log)("onEvent returned:",onEventResult);const resourceEvent=createResponseEvent(cfnRequest,onEventResult),sanitizedEvent={...resourceEvent,ResponseURL:"..."};if(onEventResult?.NoEcho?(0,util_1.log)("readacted event:",cfnResponse.redactDataFromPayload(sanitizedEvent)):(0,util_1.log)("event:",sanitizedEvent),!process.env[consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV])return cfnResponse.submitResponse("SUCCESS",resourceEvent,{noEcho:resourceEvent.NoEcho});const waiter={stateMachineArn:(0,util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV),name:resourceEvent.RequestId,input:JSON.stringify(resourceEvent)};(0,util_1.log)("starting waiter",{stateMachineArn:(0,util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV),name:resourceEvent.RequestId}),await(0,outbound_1.startExecution)(waiter)}async function isComplete(event){const sanitizedRequest={...event,ResponseURL:"..."};event?.NoEcho?(0,util_1.log)("redacted isComplete request",cfnResponse.redactDataFromPayload(sanitizedRequest)):(0,util_1.log)("isComplete",sanitizedRequest);const isCompleteResult=await invokeUserFunction(consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV,sanitizedRequest,event.ResponseURL);if(event?.NoEcho?(0,util_1.log)("redacted user isComplete returned:",cfnResponse.redactDataFromPayload(isCompleteResult)):(0,util_1.log)("user isComplete returned:",isCompleteResult),!isCompleteResult.IsComplete)throw isCompleteResult.Data&&Object.keys(isCompleteResult.Data).length>0?new Error('"Data" is not allowed if "IsComplete" is "False"'):new cfnResponse.Retry(JSON.stringify(event));const response={...event,...isCompleteResult,Data:{...event.Data,...isCompleteResult.Data}};await cfnResponse.submitResponse("SUCCESS",response,{noEcho:event.NoEcho})}async function onTimeout(timeoutEvent){(0,util_1.log)("timeoutHandler",timeoutEvent);const isCompleteRequest=JSON.parse(JSON.parse(timeoutEvent.Cause).errorMessage);await cfnResponse.submitResponse("FAILED",isCompleteRequest,{reason:"Operation timed out"})}async function invokeUserFunction(functionArnEnv,sanitizedPayload,responseUrl){const functionArn=(0,util_1.getEnv)(functionArnEnv);(0,util_1.log)(`executing user function ${functionArn} with payload`,sanitizedPayload);const resp=await(0,outbound_1.invokeFunction)({FunctionName:functionArn,Payload:JSON.stringify({...sanitizedPayload,ResponseURL:responseUrl})});(0,util_1.log)("user function response:",resp,typeof resp);const jsonPayload=(0,util_1.parseJsonPayload)(resp.Payload);if(resp.FunctionError){(0,util_1.log)("user function threw an error:",resp.FunctionError);const errorMessage=jsonPayload.errorMessage||"error",arn=functionArn.split(":"),functionName=arn[arn.length-1],message=[errorMessage,"",`Logs: /aws/lambda/${functionName}`,""].join(` +`),e=new Error(message);throw jsonPayload.trace&&(e.stack=[message,...jsonPayload.trace.slice(1)].join(` +`)),e}return jsonPayload}function createResponseEvent(cfnRequest,onEventResult){onEventResult=onEventResult||{};const physicalResourceId=onEventResult.PhysicalResourceId||defaultPhysicalResourceId(cfnRequest);if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}" during deletion`);return cfnRequest.RequestType==="Update"&&physicalResourceId!==cfnRequest.PhysicalResourceId&&(0,util_1.log)(`UPDATE: changing physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}"`),{...cfnRequest,...onEventResult,PhysicalResourceId:physicalResourceId}}function defaultPhysicalResourceId(req){switch(req.RequestType){case"Create":return req.RequestId;case"Update":case"Delete":return req.PhysicalResourceId;default:throw new Error(`Invalid "RequestType" in request "${JSON.stringify(req)}"`)}}module.exports={[consts.FRAMEWORK_ON_EVENT_HANDLER_NAME]:cfnResponse.safeHandler(onEvent),[consts.FRAMEWORK_IS_COMPLETE_HANDLER_NAME]:cfnResponse.safeHandler(isComplete),[consts.FRAMEWORK_ON_TIMEOUT_HANDLER_NAME]:onTimeout}; diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/outbound.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/outbound.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/outbound.js rename to source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/outbound.js diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/util.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/util.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/util.js rename to source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/util.js diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/framework.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/framework.js deleted file mode 100644 index 42ca4b146..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b/framework.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";const cfnResponse=require("./cfn-response"),consts=require("./consts"),outbound_1=require("./outbound"),util_1=require("./util");async function onEvent(cfnRequest){const sanitizedRequest={...cfnRequest,ResponseURL:"..."};(0,util_1.log)("onEventHandler",sanitizedRequest),cfnRequest.ResourceProperties=cfnRequest.ResourceProperties||{};const onEventResult=await invokeUserFunction(consts.USER_ON_EVENT_FUNCTION_ARN_ENV,sanitizedRequest,cfnRequest.ResponseURL);onEventResult?.NoEcho?(0,util_1.log)("redacted onEvent returned:",cfnResponse.redactDataFromPayload(onEventResult)):(0,util_1.log)("onEvent returned:",onEventResult);const resourceEvent=createResponseEvent(cfnRequest,onEventResult);if(onEventResult?.NoEcho?(0,util_1.log)("readacted event:",cfnResponse.redactDataFromPayload(resourceEvent)):(0,util_1.log)("event:",resourceEvent),!process.env[consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV])return cfnResponse.submitResponse("SUCCESS",resourceEvent,{noEcho:resourceEvent.NoEcho});const waiter={stateMachineArn:(0,util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV),name:resourceEvent.RequestId,input:JSON.stringify(resourceEvent)};(0,util_1.log)("starting waiter",{stateMachineArn:(0,util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV),name:resourceEvent.RequestId}),await(0,outbound_1.startExecution)(waiter)}async function isComplete(event){const sanitizedRequest={...event,ResponseURL:"..."};event?.NoEcho?(0,util_1.log)("redacted isComplete request",cfnResponse.redactDataFromPayload(sanitizedRequest)):(0,util_1.log)("isComplete",sanitizedRequest);const isCompleteResult=await invokeUserFunction(consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV,sanitizedRequest,event.ResponseURL);if(event?.NoEcho?(0,util_1.log)("redacted user isComplete returned:",cfnResponse.redactDataFromPayload(isCompleteResult)):(0,util_1.log)("user isComplete returned:",isCompleteResult),!isCompleteResult.IsComplete)throw isCompleteResult.Data&&Object.keys(isCompleteResult.Data).length>0?new Error('"Data" is not allowed if "IsComplete" is "False"'):new cfnResponse.Retry(JSON.stringify(event));const response={...event,...isCompleteResult,Data:{...event.Data,...isCompleteResult.Data}};await cfnResponse.submitResponse("SUCCESS",response,{noEcho:event.NoEcho})}async function onTimeout(timeoutEvent){(0,util_1.log)("timeoutHandler",timeoutEvent);const isCompleteRequest=JSON.parse(JSON.parse(timeoutEvent.Cause).errorMessage);await cfnResponse.submitResponse("FAILED",isCompleteRequest,{reason:"Operation timed out"})}async function invokeUserFunction(functionArnEnv,sanitizedPayload,responseUrl){const functionArn=(0,util_1.getEnv)(functionArnEnv);(0,util_1.log)(`executing user function ${functionArn} with payload`,sanitizedPayload);const resp=await(0,outbound_1.invokeFunction)({FunctionName:functionArn,Payload:JSON.stringify({...sanitizedPayload,ResponseURL:responseUrl})});(0,util_1.log)("user function response:",resp,typeof resp);const jsonPayload=(0,util_1.parseJsonPayload)(resp.Payload);if(resp.FunctionError){(0,util_1.log)("user function threw an error:",resp.FunctionError);const errorMessage=jsonPayload.errorMessage||"error",arn=functionArn.split(":"),functionName=arn[arn.length-1],message=[errorMessage,"",`Logs: /aws/lambda/${functionName}`,""].join(` -`),e=new Error(message);throw jsonPayload.trace&&(e.stack=[message,...jsonPayload.trace.slice(1)].join(` -`)),e}return jsonPayload}function createResponseEvent(cfnRequest,onEventResult){onEventResult=onEventResult||{};const physicalResourceId=onEventResult.PhysicalResourceId||defaultPhysicalResourceId(cfnRequest);if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}" during deletion`);return cfnRequest.RequestType==="Update"&&physicalResourceId!==cfnRequest.PhysicalResourceId&&(0,util_1.log)(`UPDATE: changing physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}"`),{...cfnRequest,...onEventResult,PhysicalResourceId:physicalResourceId}}function defaultPhysicalResourceId(req){switch(req.RequestType){case"Create":return req.RequestId;case"Update":case"Delete":return req.PhysicalResourceId;default:throw new Error(`Invalid "RequestType" in request "${JSON.stringify(req)}"`)}}module.exports={[consts.FRAMEWORK_ON_EVENT_HANDLER_NAME]:cfnResponse.safeHandler(onEvent),[consts.FRAMEWORK_IS_COMPLETE_HANDLER_NAME]:cfnResponse.safeHandler(isComplete),[consts.FRAMEWORK_ON_TIMEOUT_HANDLER_NAME]:onTimeout}; diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json index a52bf5860..4191cbff8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -27,20 +27,20 @@ } } }, - "d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b": { + "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e": { "source": { - "path": "asset.d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b", + "path": "asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b.zip", + "objectKey": "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "bc30619e412e17dfb136edfe511bbba347f6627fdac9ad02c948945be0477aa8": { + "ce274cef7a9cf88674ce9c84fc8ed4daadbf30f7a6e58e6f0e0c64d7d6b338b5": { "source": { "path": "cfts3-cmk-provided-as-bucket-prop.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bc30619e412e17dfb136edfe511bbba347f6627fdac9ad02c948945be0477aa8.json", + "objectKey": "ce274cef7a9cf88674ce9c84fc8ed4daadbf30f7a6e58e6f0e0c64d7d6b338b5.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json index 3c834e156..231c4fde8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json @@ -318,7 +318,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -1039,7 +1043,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b.zip" + "S3Key": "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e.zip" }, "Description": "AWS CDK resource provider framework - onEvent (cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider)", "Environment": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3cmkprovidedasbucketpropIntegDefaultTestDeployAssert38E63D55.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3cmkprovidedasbucketpropIntegDefaultTestDeployAssert38E63D55.assets.json index 34cfd2468..a9cc31e01 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3cmkprovidedasbucketpropIntegDefaultTestDeployAssert38E63D55.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3cmkprovidedasbucketpropIntegDefaultTestDeployAssert38E63D55.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/integ.json index d0d8e67fa..a5d325164 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-cmk-provided-as-bucket-prop/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json index 3e7633d30..97ad8b3dd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3cmkprovidedasbucketpropIntegDefaultTestDeployAssert38E63D55.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3cmkprovidedasbucketpropIntegDefaultTestDeployAssert38E63D55.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-cmk-provided-as-bucket-prop.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bc30619e412e17dfb136edfe511bbba347f6627fdac9ad02c948945be0477aa8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ce274cef7a9cf88674ce9c84fc8ed4daadbf30f7a6e58e6f0e0c64d7d6b338b5.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -220,6 +222,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-cmk-provided-as-bucket-prop/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-cmk-provided-as-bucket-prop/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json index 757ac6899..23c9564a2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json @@ -51,13 +51,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.150.0" + "version": "2.160.0" } }, "test-cloudfront-s3-cmk-encryption-key": { @@ -102,7 +102,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -236,13 +236,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -254,19 +254,19 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.150.0" + "version": "2.160.0" } }, "S3Bucket": { @@ -325,7 +325,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -385,7 +385,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -424,19 +428,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.150.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucketAccessLog": { @@ -477,7 +481,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -611,13 +615,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -629,19 +633,19 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.150.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucket": { @@ -694,7 +698,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -792,13 +796,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -810,19 +814,19 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.150.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -862,7 +866,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.150.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -922,13 +926,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.150.0" + "version": "2.160.0" } }, "LambdaFunctionServiceRole": { @@ -940,7 +944,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.150.0" + "version": "2.160.0" } }, "Resource": { @@ -1003,7 +1007,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.150.0" + "version": "2.160.0" } }, "DefaultPolicy": { @@ -1039,19 +1043,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.150.0" + "version": "2.160.0" } }, "LambdaFunction": { @@ -1067,7 +1071,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.150.0" + "version": "2.160.0" } }, "AssetBucket": { @@ -1075,13 +1079,13 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.150.0" + "version": "2.160.0" } }, "Resource": { @@ -1117,13 +1121,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.150.0" + "version": "2.160.0" } }, "test-cloudfront-s3-cmk-encryption-keyResourceCmkPolicy": { @@ -1165,13 +1169,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.150.0" + "version": "2.160.0" } }, "KmsKeyPolicyUpdateProvider": { @@ -1191,7 +1195,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.150.0" + "version": "2.160.0" } }, "Resource": { @@ -1230,7 +1234,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.150.0" + "version": "2.160.0" } }, "DefaultPolicy": { @@ -1284,19 +1288,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.150.0" + "version": "2.160.0" } }, "Code": { @@ -1308,7 +1312,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.150.0" + "version": "2.160.0" } }, "AssetBucket": { @@ -1316,13 +1320,13 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.150.0" + "version": "2.160.0" } }, "Resource": { @@ -1335,7 +1339,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "d9861ea7a45affd23e47a614acb2fddc6e45c20a891284c958187dafbf9ee36b.zip" + "s3Key": "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e.zip" }, "description": "AWS CDK resource provider framework - onEvent (cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider)", "environment": { @@ -1369,19 +1373,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "2.150.0" + "version": "2.160.0" } }, "KmsKeyPolicyUpdater": { @@ -1393,19 +1397,19 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdater/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.63.0" + "version": "2.71.0" } }, "LatestNodeRuntimeMap": { @@ -1413,7 +1417,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.150.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1425,7 +1429,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.150.0" + "version": "2.160.0" } }, "Role": { @@ -1433,7 +1437,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } }, "Handler": { @@ -1441,13 +1445,13 @@ "path": "cfts3-cmk-provided-as-bucket-prop/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.150.0" + "version": "2.160.0" } }, "Integ": { @@ -1475,7 +1479,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.150.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1483,25 +1487,25 @@ "path": "cfts3-cmk-provided-as-bucket-prop/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.150.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.150.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -1509,7 +1513,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.150.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1517,13 +1521,13 @@ "path": "cfts3-cmk-provided-as-bucket-prop/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.150.0" + "version": "2.160.0" } }, "Tree": { @@ -1537,7 +1541,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.150.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json index ce27c26ca..dd2d01fc9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -14,7 +14,7 @@ } } }, - "fff5c4249eb1f1ac9b29c3018891b821d7ffa523b04da597400c0ecb8cf020e4": { + "60c2b52691f9180b0183f7e7900902c8ba163d76f155543fcd0155cb150128ca": { "source": { "path": "cfts3-custom-headers.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fff5c4249eb1f1ac9b29c3018891b821d7ffa523b04da597400c0ecb8cf020e4.json", + "objectKey": "60c2b52691f9180b0183f7e7900902c8ba163d76f155543fcd0155cb150128ca.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json index 48cb58417..2e13ca203 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json @@ -353,7 +353,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3customheadersIntegDefaultTestDeployAssert6EEC9973.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3customheadersIntegDefaultTestDeployAssert6EEC9973.assets.json index 6084e0b57..98b0f2675 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3customheadersIntegDefaultTestDeployAssert6EEC9973.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3customheadersIntegDefaultTestDeployAssert6EEC9973.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/integ.json index 9e35d7e7c..f63e3c838 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-custom-headers/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/manifest.json index e73efbd9a..e2b90ae0e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3customheadersIntegDefaultTestDeployAssert6EEC9973.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3customheadersIntegDefaultTestDeployAssert6EEC9973.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-custom-headers.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fff5c4249eb1f1ac9b29c3018891b821d7ffa523b04da597400c0ecb8cf020e4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/60c2b52691f9180b0183f7e7900902c8ba163d76f155543fcd0155cb150128ca.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -184,6 +186,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-custom-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-custom-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/tree.json index 339d6350e..24580be6f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/tree.json @@ -49,13 +49,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.149.0" + "version": "2.160.0" } }, "test-cloudfront-s3": { @@ -100,7 +100,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -234,13 +234,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -252,19 +252,19 @@ "path": "cfts3-custom-headers/test-cloudfront-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "S3Bucket": { @@ -323,7 +323,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -422,7 +422,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -461,13 +465,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -479,19 +483,19 @@ "path": "cfts3-custom-headers/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "SetHttpSecurityHeaders": { @@ -515,13 +519,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucketAccessLog": { @@ -562,7 +566,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -696,13 +700,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -714,19 +718,19 @@ "path": "cfts3-custom-headers/test-cloudfront-s3/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucket": { @@ -779,7 +783,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -877,13 +881,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -895,19 +899,19 @@ "path": "cfts3-custom-headers/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -947,7 +951,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -1018,19 +1022,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.62.0" + "version": "2.71.0" } }, "LatestNodeRuntimeMap": { @@ -1038,7 +1042,7 @@ "path": "cfts3-custom-headers/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.149.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1050,7 +1054,7 @@ "path": "cfts3-custom-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.149.0" + "version": "2.160.0" } }, "Role": { @@ -1058,7 +1062,7 @@ "path": "cfts3-custom-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } }, "Handler": { @@ -1066,13 +1070,13 @@ "path": "cfts3-custom-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.149.0" + "version": "2.160.0" } }, "Integ": { @@ -1100,7 +1104,7 @@ "path": "cfts3-custom-headers/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1108,25 +1112,25 @@ "path": "cfts3-custom-headers/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -1134,7 +1138,7 @@ "path": "cfts3-custom-headers/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1142,13 +1146,13 @@ "path": "cfts3-custom-headers/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } }, "Tree": { @@ -1162,7 +1166,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.149.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json index 360ea1678..81f003f38 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -14,7 +14,7 @@ } } }, - "a71d33e7bdeaa6a7b44f0c0663bfac2d291c59c96e9459baf589dd93e2a659cd": { + "085515d2293b2dd2b735201a9780ea51096d4e4061c7a4089b110fb884f72411": { "source": { "path": "cfts3-custom-originPath.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a71d33e7bdeaa6a7b44f0c0663bfac2d291c59c96e9459baf589dd93e2a659cd.json", + "objectKey": "085515d2293b2dd2b735201a9780ea51096d4e4061c7a4089b110fb884f72411.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json index 181e3e29a..975e06f03 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json @@ -321,7 +321,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3customoriginPathIntegDefaultTestDeployAssert61F499B2.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3customoriginPathIntegDefaultTestDeployAssert61F499B2.assets.json index 1e14415c7..9fd89348b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3customoriginPathIntegDefaultTestDeployAssert61F499B2.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3customoriginPathIntegDefaultTestDeployAssert61F499B2.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/integ.json index 78c0672e5..7a7b44463 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-custom-originPath/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json index 0ececddc5..e002f9549 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3customoriginPathIntegDefaultTestDeployAssert61F499B2.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3customoriginPathIntegDefaultTestDeployAssert61F499B2.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-custom-originPath.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a71d33e7bdeaa6a7b44f0c0663bfac2d291c59c96e9459baf589dd93e2a659cd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/085515d2293b2dd2b735201a9780ea51096d4e4061c7a4089b110fb884f72411.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -178,6 +180,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-custom-originPath/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-custom-originPath/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/tree.json index c3d7b2781..369e952e6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "cfts3-custom-originPath/test-cloudfront-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -372,7 +372,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -411,13 +415,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -429,19 +433,19 @@ "path": "cfts3-custom-originPath/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "SetHttpSecurityHeaders": { @@ -465,13 +469,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucketAccessLog": { @@ -512,7 +516,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -646,13 +650,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -664,19 +668,19 @@ "path": "cfts3-custom-originPath/test-cloudfront-s3/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucket": { @@ -729,7 +733,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -827,13 +831,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -845,19 +849,19 @@ "path": "cfts3-custom-originPath/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -897,7 +901,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -968,19 +972,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.62.0" + "version": "2.71.0" } }, "LatestNodeRuntimeMap": { @@ -988,7 +992,7 @@ "path": "cfts3-custom-originPath/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.149.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1000,7 +1004,7 @@ "path": "cfts3-custom-originPath/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.149.0" + "version": "2.160.0" } }, "Role": { @@ -1008,7 +1012,7 @@ "path": "cfts3-custom-originPath/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } }, "Handler": { @@ -1016,13 +1020,13 @@ "path": "cfts3-custom-originPath/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.149.0" + "version": "2.160.0" } }, "Integ": { @@ -1050,7 +1054,7 @@ "path": "cfts3-custom-originPath/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1058,25 +1062,25 @@ "path": "cfts3-custom-originPath/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -1084,7 +1088,7 @@ "path": "cfts3-custom-originPath/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1092,13 +1096,13 @@ "path": "cfts3-custom-originPath/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } }, "Tree": { @@ -1112,7 +1116,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.149.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json index 1f5a72f33..3cbb4787c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -14,7 +14,7 @@ } } }, - "670b6dee6a188f3d0d80e9d946c7d8bc4ce00543085b9d0c1673c90d8476bafa": { + "36f73632392bd60fb7b2cfd26aeb8f9d4d487c848d656446ef62e096c8d04947": { "source": { "path": "cfts3-customLoggingBuckets.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "670b6dee6a188f3d0d80e9d946c7d8bc4ce00543085b9d0c1673c90d8476bafa.json", + "objectKey": "36f73632392bd60fb7b2cfd26aeb8f9d4d487c848d656446ef62e096c8d04947.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json index 26577401c..826fe3139 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json @@ -333,7 +333,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3customLoggingBucketsIntegDefaultTestDeployAssert4D171F9F.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3customLoggingBucketsIntegDefaultTestDeployAssert4D171F9F.assets.json index 07670cd35..462e871be 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3customLoggingBucketsIntegDefaultTestDeployAssert4D171F9F.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3customLoggingBucketsIntegDefaultTestDeployAssert4D171F9F.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/integ.json index e3d8d57c1..10e9daaef 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-customLoggingBuckets/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json index 6a18a3b60..fa07f0402 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3customLoggingBucketsIntegDefaultTestDeployAssert4D171F9F.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3customLoggingBucketsIntegDefaultTestDeployAssert4D171F9F.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-customLoggingBuckets.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/670b6dee6a188f3d0d80e9d946c7d8bc4ce00543085b9d0c1673c90d8476bafa.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/36f73632392bd60fb7b2cfd26aeb8f9d4d487c848d656446ef62e096c8d04947.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -178,6 +180,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-customLoggingBuckets/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-customLoggingBuckets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json index 735631357..6e7524e05 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json @@ -63,7 +63,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -197,13 +197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -215,19 +215,19 @@ "path": "cfts3-customLoggingBuckets/test-cloudfront-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "S3Bucket": { @@ -286,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -385,7 +385,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -424,13 +428,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -442,19 +446,19 @@ "path": "cfts3-customLoggingBuckets/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "SetHttpSecurityHeaders": { @@ -478,13 +482,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucketAccessLog": { @@ -525,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -659,13 +663,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -677,19 +681,19 @@ "path": "cfts3-customLoggingBuckets/test-cloudfront-s3/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucket": { @@ -755,7 +759,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -853,13 +857,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -871,19 +875,19 @@ "path": "cfts3-customLoggingBuckets/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -923,7 +927,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -994,19 +998,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.62.0" + "version": "2.71.0" } }, "LatestNodeRuntimeMap": { @@ -1014,7 +1018,7 @@ "path": "cfts3-customLoggingBuckets/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.149.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1026,7 +1030,7 @@ "path": "cfts3-customLoggingBuckets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.149.0" + "version": "2.160.0" } }, "Role": { @@ -1034,7 +1038,7 @@ "path": "cfts3-customLoggingBuckets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } }, "Handler": { @@ -1042,13 +1046,13 @@ "path": "cfts3-customLoggingBuckets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.149.0" + "version": "2.160.0" } }, "Integ": { @@ -1076,7 +1080,7 @@ "path": "cfts3-customLoggingBuckets/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1084,25 +1088,25 @@ "path": "cfts3-customLoggingBuckets/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -1110,7 +1114,7 @@ "path": "cfts3-customLoggingBuckets/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1118,13 +1122,13 @@ "path": "cfts3-customLoggingBuckets/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } }, "Tree": { @@ -1138,7 +1142,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.149.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json index bb9eda6c6..5e6232f92 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -14,7 +14,7 @@ } } }, - "587e9ada4d8b4c1d1646e8575b4ef10de3b6b5b62270dc88f3b957a4713feb54": { + "7742ae33c61dc9def53210b6e17604107727eb7bcd0c975ee874601c533ef2d8": { "source": { "path": "cfts3-existing-bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "587e9ada4d8b4c1d1646e8575b4ef10de3b6b5b62270dc88f3b957a4713feb54.json", + "objectKey": "7742ae33c61dc9def53210b6e17604107727eb7bcd0c975ee874601c533ef2d8.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json index 44321f718..84340a647 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json @@ -379,7 +379,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3existingbucketIntegDefaultTestDeployAssertA6D4EB49.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3existingbucketIntegDefaultTestDeployAssertA6D4EB49.assets.json index c8a907349..dfec9125a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3existingbucketIntegDefaultTestDeployAssertA6D4EB49.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3existingbucketIntegDefaultTestDeployAssertA6D4EB49.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/integ.json index 8193bf2ed..5fc9c8baa 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-existing-bucket/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json index 5a5b69ec4..5a1e3a493 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3existingbucketIntegDefaultTestDeployAssertA6D4EB49.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3existingbucketIntegDefaultTestDeployAssertA6D4EB49.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-existing-bucket.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/587e9ada4d8b4c1d1646e8575b4ef10de3b6b5b62270dc88f3b957a4713feb54.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7742ae33c61dc9def53210b6e17604107727eb7bcd0c975ee874601c533ef2d8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -106,6 +108,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/tree.json index 87315b91c..5ec865cc5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,19 @@ "path": "cfts3-existing-bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "LatestNodeRuntimeMap": { @@ -212,7 +212,7 @@ "path": "cfts3-existing-bucket/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.149.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -224,7 +224,7 @@ "path": "cfts3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.149.0" + "version": "2.160.0" } }, "Role": { @@ -232,7 +232,7 @@ "path": "cfts3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } }, "Handler": { @@ -240,13 +240,13 @@ "path": "cfts3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.149.0" + "version": "2.160.0" } }, "scrapBucket": { @@ -286,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -385,7 +385,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -450,13 +454,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -468,19 +472,19 @@ "path": "cfts3-existing-bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "test-cloudfront-s3": { @@ -508,13 +512,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucketAccessLog": { @@ -555,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -689,13 +693,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -707,19 +711,19 @@ "path": "cfts3-existing-bucket/test-cloudfront-s3/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucket": { @@ -772,7 +776,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -870,13 +874,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -888,19 +892,19 @@ "path": "cfts3-existing-bucket/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -940,7 +944,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -1044,7 +1048,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.149.0" + "version": "2.160.0" } }, "Origin2": { @@ -1068,13 +1072,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnCloudFrontOriginAccessIdentity", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginAccessIdentity", - "version": "2.149.0" + "version": "2.160.0" } } }, @@ -1086,13 +1090,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.62.0" + "version": "2.71.0" } }, "myCachePolicy": { @@ -1128,13 +1132,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnCachePolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CachePolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "Integ": { @@ -1162,7 +1166,7 @@ "path": "cfts3-existing-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1170,25 +1174,25 @@ "path": "cfts3-existing-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -1196,7 +1200,7 @@ "path": "cfts3-existing-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1204,13 +1208,13 @@ "path": "cfts3-existing-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } }, "Tree": { @@ -1224,7 +1228,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.149.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json index d98699c21..a9e921a81 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -14,7 +14,7 @@ } } }, - "fdb047a490cfd4b6f5fc89e517d4ed6fe9814be764ff84defcc963675ae2bf81": { + "0069525f5ab6b06f568125224a7bf98fe401a8619afa2dce50de9ace55a1cf76": { "source": { "path": "cfts3-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fdb047a490cfd4b6f5fc89e517d4ed6fe9814be764ff84defcc963675ae2bf81.json", + "objectKey": "0069525f5ab6b06f568125224a7bf98fe401a8619afa2dce50de9ace55a1cf76.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json index aa7ed64fb..e4807f6e6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json @@ -331,7 +331,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3noargumentsIntegDefaultTestDeployAssertBA5AFA25.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3noargumentsIntegDefaultTestDeployAssertBA5AFA25.assets.json index c4b7dabac..06c34e597 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3noargumentsIntegDefaultTestDeployAssertBA5AFA25.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3noargumentsIntegDefaultTestDeployAssertBA5AFA25.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/integ.json index 5aaad6b24..9bbb99b7b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-no-arguments/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/manifest.json index f4fc880de..0f67ef2df 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3noargumentsIntegDefaultTestDeployAssertBA5AFA25.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3noargumentsIntegDefaultTestDeployAssertBA5AFA25.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-no-arguments.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fdb047a490cfd4b6f5fc89e517d4ed6fe9814be764ff84defcc963675ae2bf81.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0069525f5ab6b06f568125224a7bf98fe401a8619afa2dce50de9ace55a1cf76.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -178,6 +180,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/tree.json index 675c81223..075993747 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "cfts3-no-arguments/test-cloudfront-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -372,7 +372,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -411,13 +415,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -429,19 +433,19 @@ "path": "cfts3-no-arguments/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "SetHttpSecurityHeaders": { @@ -465,13 +469,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucketAccessLog": { @@ -512,7 +516,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -646,13 +650,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -664,19 +668,19 @@ "path": "cfts3-no-arguments/test-cloudfront-s3/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucket": { @@ -729,7 +733,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -827,13 +831,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -845,19 +849,19 @@ "path": "cfts3-no-arguments/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -897,7 +901,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -968,19 +972,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.62.0" + "version": "2.71.0" } }, "LatestNodeRuntimeMap": { @@ -988,7 +992,7 @@ "path": "cfts3-no-arguments/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.149.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1000,7 +1004,7 @@ "path": "cfts3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.149.0" + "version": "2.160.0" } }, "Role": { @@ -1008,7 +1012,7 @@ "path": "cfts3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } }, "Handler": { @@ -1016,13 +1020,13 @@ "path": "cfts3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.149.0" + "version": "2.160.0" } }, "Integ": { @@ -1050,7 +1054,7 @@ "path": "cfts3-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1058,25 +1062,25 @@ "path": "cfts3-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -1084,7 +1088,7 @@ "path": "cfts3-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1092,13 +1096,13 @@ "path": "cfts3-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } }, "Tree": { @@ -1112,7 +1116,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.149.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3-no-cloudfront-s3-access-logs.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3-no-cloudfront-s3-access-logs.assets.json index f2be610e7..48903c6e3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3-no-cloudfront-s3-access-logs.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3-no-cloudfront-s3-access-logs.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -14,7 +14,7 @@ } } }, - "2f243ee02d0d9f84e5689c06d73d76d7fd92ba9db35b4a121be82a0d6ba488d4": { + "3f70e7db831d98e4b725ad3c2d2771e42f24629f4702c27cd89a5e22a77f797a": { "source": { "path": "cfts3-no-cloudfront-s3-access-logs.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2f243ee02d0d9f84e5689c06d73d76d7fd92ba9db35b4a121be82a0d6ba488d4.json", + "objectKey": "3f70e7db831d98e4b725ad3c2d2771e42f24629f4702c27cd89a5e22a77f797a.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3-no-cloudfront-s3-access-logs.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3-no-cloudfront-s3-access-logs.template.json index 67b21e164..113f6d5e9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3-no-cloudfront-s3-access-logs.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3-no-cloudfront-s3-access-logs.template.json @@ -144,7 +144,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3nocloudfronts3accesslogsIntegDefaultTestDeployAssertAD28C87A.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3nocloudfronts3accesslogsIntegDefaultTestDeployAssertAD28C87A.assets.json index ecce0f9b8..02aac6a5e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3nocloudfronts3accesslogsIntegDefaultTestDeployAssertAD28C87A.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/cfts3nocloudfronts3accesslogsIntegDefaultTestDeployAssertAD28C87A.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/integ.json index 9d4306047..de6d72a9b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-no-cloudfront-s3-access-logs/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/manifest.json index 7df0d0650..06fca2490 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3nocloudfronts3accesslogsIntegDefaultTestDeployAssertAD28C87A.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3nocloudfronts3accesslogsIntegDefaultTestDeployAssertAD28C87A.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-no-cloudfront-s3-access-logs.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2f243ee02d0d9f84e5689c06d73d76d7fd92ba9db35b4a121be82a0d6ba488d4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3f70e7db831d98e4b725ad3c2d2771e42f24629f4702c27cd89a5e22a77f797a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +144,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-no-cloudfront-s3-access-logs/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-no-cloudfront-s3-access-logs/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/tree.json index d47016a28..c8fcdfebb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-cloudfront-s3-access-logs.js.snapshot/tree.json @@ -63,7 +63,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -162,7 +162,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -201,13 +205,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -219,19 +223,19 @@ "path": "cfts3-no-cloudfront-s3-access-logs/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.150.0" + "version": "2.160.0" } }, "SetHttpSecurityHeaders": { @@ -255,13 +259,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.150.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucket": { @@ -309,7 +313,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.150.0" + "version": "2.160.0" } }, "Policy": { @@ -407,13 +411,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.150.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -425,19 +429,19 @@ "path": "cfts3-no-cloudfront-s3-access-logs/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.150.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -477,7 +481,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.150.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -548,19 +552,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.64.0" + "version": "2.71.0" } }, "LatestNodeRuntimeMap": { @@ -568,7 +572,7 @@ "path": "cfts3-no-cloudfront-s3-access-logs/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.150.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -580,7 +584,7 @@ "path": "cfts3-no-cloudfront-s3-access-logs/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.150.0" + "version": "2.160.0" } }, "Role": { @@ -588,7 +592,7 @@ "path": "cfts3-no-cloudfront-s3-access-logs/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } }, "Handler": { @@ -596,13 +600,13 @@ "path": "cfts3-no-cloudfront-s3-access-logs/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.150.0" + "version": "2.160.0" } }, "Integ": { @@ -630,7 +634,7 @@ "path": "cfts3-no-cloudfront-s3-access-logs/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.150.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -638,25 +642,25 @@ "path": "cfts3-no-cloudfront-s3-access-logs/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.150.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.150.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -664,7 +668,7 @@ "path": "cfts3-no-cloudfront-s3-access-logs/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.150.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -672,13 +676,13 @@ "path": "cfts3-no-cloudfront-s3-access-logs/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.150.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.150.0" + "version": "2.160.0" } }, "Tree": { @@ -692,7 +696,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.150.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.assets.json index 571634a12..92a422679 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -14,7 +14,7 @@ } } }, - "67081c64d4c0365295529dc921349905677d339d748d52dbda76863c7ae69539": { + "f4604590b01528cf1d9e964991f75867b9bfe0a55b2be090ae95f630a5ff064e": { "source": { "path": "cfts3-no-logging.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "67081c64d4c0365295529dc921349905677d339d748d52dbda76863c7ae69539.json", + "objectKey": "f4604590b01528cf1d9e964991f75867b9bfe0a55b2be090ae95f630a5ff064e.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.template.json index bfe7ebfe7..f93feae40 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.template.json @@ -144,7 +144,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3nologgingIntegDefaultTestDeployAssert18393DDB.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3nologgingIntegDefaultTestDeployAssert18393DDB.assets.json index 5e9030c45..39e1a04d0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3nologgingIntegDefaultTestDeployAssert18393DDB.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3nologgingIntegDefaultTestDeployAssert18393DDB.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/integ.json index c5844e7c2..174173b90 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-no-logging/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/manifest.json index f0d07e9ec..1240cb56e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3nologgingIntegDefaultTestDeployAssert18393DDB.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3nologgingIntegDefaultTestDeployAssert18393DDB.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-no-logging.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/67081c64d4c0365295529dc921349905677d339d748d52dbda76863c7ae69539.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4604590b01528cf1d9e964991f75867b9bfe0a55b2be090ae95f630a5ff064e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -124,6 +126,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/tree.json index 86b60d373..49455afda 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/tree.json @@ -63,7 +63,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -162,7 +162,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -201,13 +205,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -219,19 +223,19 @@ "path": "cfts3-no-logging/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "SetHttpSecurityHeaders": { @@ -255,13 +259,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -301,7 +305,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -364,19 +368,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.62.0" + "version": "2.71.0" } }, "LatestNodeRuntimeMap": { @@ -384,7 +388,7 @@ "path": "cfts3-no-logging/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.149.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -396,7 +400,7 @@ "path": "cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.149.0" + "version": "2.160.0" } }, "Role": { @@ -404,7 +408,7 @@ "path": "cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } }, "Handler": { @@ -412,13 +416,13 @@ "path": "cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.149.0" + "version": "2.160.0" } }, "Integ": { @@ -446,7 +450,7 @@ "path": "cfts3-no-logging/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -454,25 +458,25 @@ "path": "cfts3-no-logging/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -480,7 +484,7 @@ "path": "cfts3-no-logging/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -488,13 +492,13 @@ "path": "cfts3-no-logging/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } }, "Tree": { @@ -508,7 +512,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.149.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cdk.out index 1f0068d32..c6e612584 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cdk.out +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json index 919c47f44..db084f3bc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { @@ -14,7 +14,7 @@ } } }, - "d53d73b2eb80f1de22b681da184b2aad235da0a564bf2fa8edfc1197951132dc": { + "f81214d0e4f1c5e0426e9d602d3cb8371c75674b6f876e3ec444adeedcba1e5a": { "source": { "path": "cfts3-no-security-headers.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d53d73b2eb80f1de22b681da184b2aad235da0a564bf2fa8edfc1197951132dc.json", + "objectKey": "f81214d0e4f1c5e0426e9d602d3cb8371c75674b6f876e3ec444adeedcba1e5a.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json index 9e22ef488..1012760d0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json @@ -321,7 +321,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3nosecurityheadersIntegDefaultTestDeployAssert38FE05BE.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3nosecurityheadersIntegDefaultTestDeployAssert38FE05BE.assets.json index b51b82ac8..87a368497 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3nosecurityheadersIntegDefaultTestDeployAssert38FE05BE.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3nosecurityheadersIntegDefaultTestDeployAssert38FE05BE.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/integ.json index 51628909c..851dfa2a1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/integ.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "cfts3-no-security-headers/Integ/DefaultTest": { "stacks": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json index 0ee26f09c..331c62aba 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cfts3nosecurityheadersIntegDefaultTestDeployAssert38FE05BE.assets": { "type": "cdk:asset-manifest", @@ -16,6 +16,7 @@ "templateFile": "cfts3nosecurityheadersIntegDefaultTestDeployAssert38FE05BE.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", @@ -64,9 +65,10 @@ "templateFile": "cfts3-no-security-headers.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d53d73b2eb80f1de22b681da184b2aad235da0a564bf2fa8edfc1197951132dc.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f81214d0e4f1c5e0426e9d602d3cb8371c75674b6f876e3ec444adeedcba1e5a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +174,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cfts3-no-security-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cfts3-no-security-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/tree.json index 9002af3c5..616537ca7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "cfts3-no-security-headers/test-cloudfront-s3-no-security-headers/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -372,7 +372,11 @@ "Fn::Join": [ "", [ - "arn:aws:cloudfront::", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":cloudfront::", { "Ref": "AWS::AccountId" }, @@ -411,13 +415,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -429,19 +433,19 @@ "path": "cfts3-no-security-headers/test-cloudfront-s3-no-security-headers/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucketAccessLog": { @@ -482,7 +486,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -616,13 +620,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -634,19 +638,19 @@ "path": "cfts3-no-security-headers/test-cloudfront-s3-no-security-headers/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudfrontLoggingBucket": { @@ -699,7 +703,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.149.0" + "version": "2.160.0" } }, "Policy": { @@ -797,13 +801,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.149.0" + "version": "2.160.0" } }, "AutoDeleteObjectsCustomResource": { @@ -815,19 +819,19 @@ "path": "cfts3-no-security-headers/test-cloudfront-s3-no-security-headers/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontOac": { @@ -867,7 +871,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.149.0" + "version": "2.160.0" } }, "CloudFrontDistribution": { @@ -927,19 +931,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.62.0" + "version": "2.71.0" } }, "LatestNodeRuntimeMap": { @@ -947,7 +951,7 @@ "path": "cfts3-no-security-headers/LatestNodeRuntimeMap", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.149.0" + "version": "2.160.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -959,7 +963,7 @@ "path": "cfts3-no-security-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.149.0" + "version": "2.160.0" } }, "Role": { @@ -967,7 +971,7 @@ "path": "cfts3-no-security-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } }, "Handler": { @@ -975,13 +979,13 @@ "path": "cfts3-no-security-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.149.0" + "version": "2.160.0" } }, "Integ": { @@ -1009,7 +1013,7 @@ "path": "cfts3-no-security-headers/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1017,25 +1021,25 @@ "path": "cfts3-no-security-headers/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.149.0-alpha.0" + "version": "2.160.0-alpha.0" } }, "BootstrapVersion": { @@ -1043,7 +1047,7 @@ "path": "cfts3-no-security-headers/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.149.0" + "version": "2.160.0" } }, "CheckBootstrapVersion": { @@ -1051,13 +1055,13 @@ "path": "cfts3-no-security-headers/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.149.0" + "version": "2.160.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.149.0" + "version": "2.160.0" } }, "Tree": { @@ -1071,7 +1075,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.149.0" + "version": "2.160.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/core/lib/utils.ts b/source/patterns/@aws-solutions-constructs/core/lib/utils.ts index 2eeaa58b5..78212cdad 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/utils.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/utils.ts @@ -184,7 +184,7 @@ export function generatePhysicalName( /** * Removes all non-alphanumeric characters in a string. */ -function removeNonAlphanumeric(s: string) { +export function removeNonAlphanumeric(s: string) { return s.replace(/[^A-Za-z0-9]/g, ''); } diff --git a/source/patterns/@aws-solutions-constructs/core/test/utils.test.ts b/source/patterns/@aws-solutions-constructs/core/test/utils.test.ts index 8d7639868..9d3df1502 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/utils.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/utils.test.ts @@ -340,4 +340,14 @@ test('test addCfnGuardSuppressRules', () => { const bucket = template.findResources("AWS::S3::Bucket"); expect(bucket.testbucketE6E05ABE.Metadata.guard.SuppressedRules[0]).toEqual("ADDED_TO_BUCKET"); expect(bucket.testbucketE6E05ABE.Metadata.guard.SuppressedRules[1]).toEqual("ADDED_TO_CFN_RESOURCE"); -}); \ No newline at end of file +}); + +test('Test removeNonAlphanumeric', () => { + const source = '\\this&&is%a#stringg@'; + const desiredResult = 'thisisastringg'; + + const result = defaults.removeNonAlphanumeric(source); + + expect(result).toEqual(desiredResult); + +});