From 84efa08058fa367b906f60133907d5af42893b52 Mon Sep 17 00:00:00 2001 From: biffgaut Date: Thu, 11 Apr 2024 21:32:30 -0400 Subject: [PATCH 1/2] Ensure anything creating a Key uses an id argument in name --- .../test/apigateway-sqs.test.ts | 6 +- .../aws-eventbridge-sns/lib/index.ts | 2 +- .../test/eventbridge-sns-topic.test.ts | 12 +-- .../evtsns-exist-bus.assets.json | 4 +- .../evtsns-exist-bus.template.json | 4 +- .../manifest.json | 15 +++- .../tree.json | 54 ++++++------ .../evtsns-new-bus.assets.json | 4 +- .../evtsns-new-bus.template.json | 4 +- .../manifest.json | 15 +++- .../tree.json | 54 ++++++------ .../evtsns-no-arg.assets.json | 4 +- .../evtsns-no-arg.template.json | 4 +- .../manifest.json | 15 +++- .../integ.evtsns-no-arg.js.snapshot/tree.json | 50 +++++------ .../test/eventbridge-sqs-queue.test.ts | 12 +-- .../evtsqs-new-bus.assets.json | 4 +- .../evtsqs-new-bus.template.json | 4 +- .../manifest.json | 15 +++- .../tree.json | 62 +++++++------- .../evtsqs-no-arg.assets.json | 4 +- .../evtsqs-no-arg.template.json | 4 +- .../manifest.json | 15 +++- .../integ.evtsqs-no-arg.js.snapshot/tree.json | 58 ++++++------- .../aws-fargate-sns/lib/index.ts | 2 +- .../aws-fargate-sns/test/fargate-sns.test.ts | 6 +- .../aws-fargate-sqs/test/fargate-sqs.test.ts | 4 +- ...otsqs-custom-max-receive-count.assets.json | 4 +- ...sqs-custom-max-receive-count.template.json | 6 +- .../manifest.json | 15 +++- .../tree.json | 68 +++++++-------- .../iotsqs-dead-letter-queue-off.assets.json | 4 +- ...iotsqs-dead-letter-queue-off.template.json | 6 +- .../manifest.json | 15 +++- .../tree.json | 60 +++++++------- .../iotsqs-default-arguments.assets.json | 4 +- .../iotsqs-default-arguments.template.json | 6 +- .../manifest.json | 15 +++- .../tree.json | 68 +++++++-------- .../iotsqs-use-kms-key-props.assets.json | 4 +- .../iotsqs-use-kms-key-props.template.json | 10 +-- .../manifest.json | 28 +++++-- .../tree.json | 78 +++++++++--------- .../iotsqs-use-queue-props.assets.json | 4 +- .../iotsqs-use-queue-props.template.json | 6 +- .../manifest.json | 15 +++- .../tree.json | 68 +++++++-------- .../aws-iot-sqs/test/iot-sqs.test.ts | 6 +- .../aws-lambda-sagemakerendpoint/lib/index.ts | 1 + .../test/aws-lambda-sagemakerendpoint.test.ts | 10 +-- .../lamsag-deployFunction.assets.json | 4 +- .../lamsag-deployFunction.template.json | 4 +- .../manifest.json | 20 ++++- .../tree.json | 82 +++++++++---------- .../lamsag-existingFunction.assets.json | 4 +- .../lamsag-existingFunction.template.json | 4 +- .../manifest.json | 20 ++++- .../tree.json | 82 +++++++++---------- ...msag-existingSageMakerEndpoint.assets.json | 4 +- ...ag-existingSageMakerEndpoint.template.json | 4 +- .../manifest.json | 20 ++++- .../tree.json | 82 +++++++++---------- .../integ.lamsag-existingSageMakerEndpoint.ts | 2 +- .../test/lambda-secretsmanager.test.ts | 4 +- .../aws-lambda-sns/lib/index.ts | 2 +- .../aws-lambda-sns/test/lambda-sns.test.ts | 6 +- .../lamsqs-useCmk.assets.json | 4 +- .../lamsqs-useCmk.template.json | 6 +- .../manifest.json | 15 +++- .../integ.lamsqs-useCmk.js.snapshot/tree.json | 76 ++++++++--------- .../aws-lambda-sqs/test/lambda-sqs.test.ts | 6 +- .../aws-s3-sns/lib/index.ts | 2 +- .../manifest.json | 15 +++- .../s3sns-customLoggingBucket.assets.json | 4 +- .../s3sns-customLoggingBucket.template.json | 4 +- .../tree.json | 10 +-- .../manifest.json | 15 +++- .../s3sns-existingS3Bucket.assets.json | 4 +- .../s3sns-existingS3Bucket.template.json | 4 +- .../tree.json | 10 +-- .../manifest.json | 15 +++- .../s3sns-existingSnsTopic.assets.json | 4 +- .../s3sns-existingSnsTopic.template.json | 4 +- .../tree.json | 10 +-- .../test/integ.s3sns-existingSnsTopic.ts | 4 +- .../manifest.json | 15 +++- .../s3sns-newTopicFromProps.assets.json | 4 +- .../s3sns-newTopicFromProps.template.json | 4 +- .../tree.json | 10 +-- .../manifest.json | 15 +++- .../s3sns-noArguments.assets.json | 4 +- .../s3sns-noArguments.template.json | 4 +- .../tree.json | 10 +-- .../manifest.json | 15 +++- .../s3sns-s3EventTypesAndFilters.assets.json | 4 +- ...s3sns-s3EventTypesAndFilters.template.json | 4 +- .../tree.json | 10 +-- .../aws-s3-sns/test/test.s3-sns.test.ts | 10 +-- .../manifest.json | 15 +++- .../s3sqs-customLoggingBucket.assets.json | 4 +- .../s3sqs-customLoggingBucket.template.json | 4 +- .../tree.json | 10 +-- .../manifest.json | 15 +++- .../s3sqs-existingLoggingBucket.assets.json | 4 +- .../s3sqs-existingLoggingBucket.template.json | 4 +- .../tree.json | 10 +-- .../manifest.json | 15 +++- .../s3sqs-existingQueue.assets.json | 4 +- .../s3sqs-existingQueue.template.json | 4 +- .../tree.json | 10 +-- .../manifest.json | 15 +++- .../s3sqs-existingS3Bucket.assets.json | 4 +- .../s3sqs-existingS3Bucket.template.json | 4 +- .../tree.json | 10 +-- .../manifest.json | 15 +++- .../s3sqs-noArguments.assets.json | 4 +- .../s3sqs-noArguments.template.json | 4 +- .../tree.json | 10 +-- .../aws-s3-sqs/test/test.s3-sqs.test.ts | 8 +- .../aws-sns-lambda/lib/index.ts | 2 +- .../aws-sns-lambda/test/sns-lambda.test.ts | 6 +- .../aws-sns-sqs/lib/index.ts | 4 +- .../manifest.json | 15 +++- .../snssqs-no-arguments.assets.json | 4 +- .../snssqs-no-arguments.template.json | 6 +- .../tree.json | 68 +++++++-------- .../manifest.json | 15 +++- .../snssqs-rawMessageDelivery.assets.json | 4 +- .../snssqs-rawMessageDelivery.template.json | 6 +- .../tree.json | 80 +++++++++--------- .../aws-sns-sqs/test/sns-sqs.test.ts | 6 +- .../test/test.sqs-lambda.test.ts | 6 +- .../core/lib/kms-helper.ts | 4 +- .../core/lib/sagemaker-helper.ts | 12 ++- .../core/lib/sns-helper.ts | 4 +- .../core/lib/sqs-helper.ts | 2 +- .../core/test/kinesis-streams-helper.test.ts | 2 +- .../core/test/kms-helper.test.ts | 4 +- .../core/test/sagemaker-helper.test.ts | 24 +++--- .../core/test/sns-helper.test.ts | 36 ++++---- .../core/test/sqs-helper.test.ts | 2 +- 141 files changed, 1177 insertions(+), 911 deletions(-) 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 685a3f02c..fb0485537 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 @@ -257,7 +257,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { template.hasResourceProperties("AWS::SQS::Queue", { KmsMasterKeyId: { "Fn::GetAtt": [ - "apigatewaysqsEncryptionKey4A698F7C", + "apigatewaysqsqueueKeyEC2D27F3", "Arn" ] } @@ -267,7 +267,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { AliasName: 'alias/new-key-alias-from-props', TargetKeyId: { 'Fn::GetAtt': [ - 'apigatewaysqsEncryptionKey4A698F7C', + 'apigatewaysqsqueueKeyEC2D27F3', 'Arn' ] } @@ -294,7 +294,7 @@ test('Queue is encrypted with customer managed KMS Key when enable encryption fl template.hasResourceProperties("AWS::SQS::Queue", { KmsMasterKeyId: { "Fn::GetAtt": [ - "apigatewaysqsEncryptionKey4A698F7C", + "apigatewaysqsqueueKeyEC2D27F3", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/lib/index.ts index ec101f64c..b476fe2cd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/lib/index.ts @@ -98,7 +98,7 @@ export class EventbridgeToSns extends Construct { } // Setup the sns topic. - const buildTopicResponse = defaults.buildTopic(this, { + const buildTopicResponse = defaults.buildTopic(this, id, { existingTopicObj: props.existingTopicObj, topicProps: props.topicProps, enableEncryptionWithCustomerManagedKey: enableEncryptionParam, diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/eventbridge-sns-topic.test.ts b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/eventbridge-sns-topic.test.ts index 3df78779a..767257491 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/eventbridge-sns-topic.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/eventbridge-sns-topic.test.ts @@ -196,7 +196,7 @@ test('check the sns topic properties', () => { template.hasResourceProperties('AWS::SNS::Topic', { KmsMasterKeyId: { "Fn::GetAtt": [ - "testEncryptionKeyB55BFDBC", + "testtestKeyDC306BBB", "Arn" ] } @@ -205,7 +205,7 @@ test('check the sns topic properties', () => { test('check the sns topic properties with existing KMS key', () => { const stack = new cdk.Stack(); - const key = defaults.buildEncryptionKey(stack, { + const key = defaults.buildEncryptionKey(stack, 'test', { description: 'my-key' }); @@ -222,7 +222,7 @@ test('check the sns topic properties with existing KMS key', () => { template.hasResourceProperties('AWS::SNS::Topic', { KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testKey2C00E5E5", "Arn" ] } @@ -291,7 +291,7 @@ test('check custom event bus resource with props when deploy:true', () => { test('Topic is encrypted when key is provided on topicProps.masterKey prop', () => { const stack = new cdk.Stack(); - const key = defaults.buildEncryptionKey(stack, { + const key = defaults.buildEncryptionKey(stack, 'test', { description: 'my-key' }); @@ -310,7 +310,7 @@ test('Topic is encrypted when key is provided on topicProps.masterKey prop', () template.hasResourceProperties('AWS::SNS::Topic', { KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testKey2C00E5E5", "Arn" ] } @@ -340,7 +340,7 @@ test('Topic is encrypted when keyProps are provided', () => { template.hasResourceProperties('AWS::SNS::Topic', { KmsMasterKeyId: { "Fn::GetAtt": [ - "testeventsrulesqsEncryptionKey19AB0C02", + "testeventsrulesqstesteventsrulesqsKey0BF3CCD9", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/evtsns-exist-bus.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/evtsns-exist-bus.assets.json index c58731f96..0ce0bd8df 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/evtsns-exist-bus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/evtsns-exist-bus.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "2451021956d0c5f2cdf62fa8cda83a732366091373b3685aab517752ed37428e": { + "9862b639359bc5c3fec9dffccc166e084b05fc540a1c162a1bde6ec167bd37f4": { "source": { "path": "evtsns-exist-bus.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2451021956d0c5f2cdf62fa8cda83a732366091373b3685aab517752ed37428e.json", + "objectKey": "9862b639359bc5c3fec9dffccc166e084b05fc540a1c162a1bde6ec167bd37f4.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-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/evtsns-exist-bus.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/evtsns-exist-bus.template.json index 573e1cca0..eec3c8954 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/evtsns-exist-bus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/evtsns-exist-bus.template.json @@ -6,7 +6,7 @@ "Name": "evtsnsexistbusexistingeventbusEAEACB72" } }, - "testconstructEncryptionKey6153B053": { + "testconstructtestconstructKey1FB48CCA": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -60,7 +60,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "testconstructEncryptionKey6153B053", + "testconstructtestconstructKey1FB48CCA", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/manifest.json index f2e4ed0cd..ee377f7a9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/2451021956d0c5f2cdf62fa8cda83a732366091373b3685aab517752ed37428e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9862b639359bc5c3fec9dffccc166e084b05fc540a1c162a1bde6ec167bd37f4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -88,10 +88,10 @@ "data": "existingeventbusA5B80487" } ], - "/evtsns-exist-bus/test-construct/EncryptionKey/Resource": [ + "/evtsns-exist-bus/test-construct/'test-constructKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testconstructEncryptionKey6153B053" + "data": "testconstructtestconstructKey1FB48CCA" } ], "/evtsns-exist-bus/test-construct/SnsTopic/Resource": [ @@ -123,6 +123,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testconstructEncryptionKey6153B053": [ + { + "type": "aws:cdk:logicalId", + "data": "testconstructEncryptionKey6153B053", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "evtsns-exist-bus" diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/tree.json index 38366afd7..bea15975e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-exist-bus.js.snapshot/tree.json @@ -23,26 +23,26 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.118.0" + "version": "2.135.0" } }, "test-construct": { "id": "test-construct", "path": "evtsns-exist-bus/test-construct", "children": { - "EncryptionKey": { - "id": "EncryptionKey", - "path": "evtsns-exist-bus/test-construct/EncryptionKey", + "'test-constructKey'": { + "id": "'test-constructKey'", + "path": "evtsns-exist-bus/test-construct/'test-constructKey'", "children": { "Resource": { "id": "Resource", - "path": "evtsns-exist-bus/test-construct/EncryptionKey/Resource", + "path": "evtsns-exist-bus/test-construct/'test-constructKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -92,13 +92,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "SnsTopic": { @@ -113,7 +113,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "testconstructEncryptionKey6153B053", + "testconstructtestconstructKey1FB48CCA", "Arn" ] } @@ -121,7 +121,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -228,19 +228,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.118.0" + "version": "2.135.0" } }, "EventsRule": { @@ -294,19 +294,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-sns.EventbridgeToSns", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -322,7 +322,7 @@ "path": "evtsns-exist-bus/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -334,7 +334,7 @@ "path": "evtsns-exist-bus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -342,25 +342,25 @@ "path": "evtsns-exist-bus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -368,7 +368,7 @@ "path": "evtsns-exist-bus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -376,13 +376,13 @@ "path": "evtsns-exist-bus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -390,13 +390,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/evtsns-new-bus.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/evtsns-new-bus.assets.json index 7e49c8cff..1a13dd999 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/evtsns-new-bus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/evtsns-new-bus.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "50110703ede9c14bc5c2fee15301da0ee3aa8813c65d3aabf4c0c58b74a1ef23": { + "8b6ff301fc69838f6d089d44c1de29bc904b1e818d3c4279e841a349bb83e1be": { "source": { "path": "evtsns-new-bus.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "50110703ede9c14bc5c2fee15301da0ee3aa8813c65d3aabf4c0c58b74a1ef23.json", + "objectKey": "8b6ff301fc69838f6d089d44c1de29bc904b1e818d3c4279e841a349bb83e1be.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-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/evtsns-new-bus.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/evtsns-new-bus.template.json index ff436b561..78008eeea 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/evtsns-new-bus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/evtsns-new-bus.template.json @@ -1,6 +1,6 @@ { "Resources": { - "testconstructEncryptionKey6153B053": { + "testconstructtestconstructKey1FB48CCA": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -54,7 +54,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "testconstructEncryptionKey6153B053", + "testconstructtestconstructKey1FB48CCA", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/manifest.json index 663e503f0..f28ad85df 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/50110703ede9c14bc5c2fee15301da0ee3aa8813c65d3aabf4c0c58b74a1ef23.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8b6ff301fc69838f6d089d44c1de29bc904b1e818d3c4279e841a349bb83e1be.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -82,10 +82,10 @@ "evtsns-new-bus.assets" ], "metadata": { - "/evtsns-new-bus/test-construct/EncryptionKey/Resource": [ + "/evtsns-new-bus/test-construct/'test-constructKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testconstructEncryptionKey6153B053" + "data": "testconstructtestconstructKey1FB48CCA" } ], "/evtsns-new-bus/test-construct/SnsTopic/Resource": [ @@ -123,6 +123,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testconstructEncryptionKey6153B053": [ + { + "type": "aws:cdk:logicalId", + "data": "testconstructEncryptionKey6153B053", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "evtsns-new-bus" diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/tree.json index 5c9bc427d..f4ae1eb05 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-new-bus.js.snapshot/tree.json @@ -12,13 +12,13 @@ "id": "test-construct", "path": "evtsns-new-bus/test-construct", "children": { - "EncryptionKey": { - "id": "EncryptionKey", - "path": "evtsns-new-bus/test-construct/EncryptionKey", + "'test-constructKey'": { + "id": "'test-constructKey'", + "path": "evtsns-new-bus/test-construct/'test-constructKey'", "children": { "Resource": { "id": "Resource", - "path": "evtsns-new-bus/test-construct/EncryptionKey/Resource", + "path": "evtsns-new-bus/test-construct/'test-constructKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -68,13 +68,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "SnsTopic": { @@ -89,7 +89,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "testconstructEncryptionKey6153B053", + "testconstructtestconstructKey1FB48CCA", "Arn" ] } @@ -97,7 +97,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -204,19 +204,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.118.0" + "version": "2.135.0" } }, "CustomEventBus": { @@ -234,13 +234,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.118.0" + "version": "2.135.0" } }, "EventsRule": { @@ -294,19 +294,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-sns.EventbridgeToSns", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -322,7 +322,7 @@ "path": "evtsns-new-bus/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -334,7 +334,7 @@ "path": "evtsns-new-bus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -342,25 +342,25 @@ "path": "evtsns-new-bus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -368,7 +368,7 @@ "path": "evtsns-new-bus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -376,13 +376,13 @@ "path": "evtsns-new-bus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -390,13 +390,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/evtsns-no-arg.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/evtsns-no-arg.assets.json index 88d100230..0bdb3a444 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/evtsns-no-arg.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/evtsns-no-arg.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "2aa7abfd364b75fb3a76c901e1542462b6d9cf5bdce6c095a778211369e0eeba": { + "6669605e3e1d1ac04c68763241dd00dfa807b30aad555c89cbb22f454e0e90d1": { "source": { "path": "evtsns-no-arg.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2aa7abfd364b75fb3a76c901e1542462b6d9cf5bdce6c095a778211369e0eeba.json", + "objectKey": "6669605e3e1d1ac04c68763241dd00dfa807b30aad555c89cbb22f454e0e90d1.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-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/evtsns-no-arg.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/evtsns-no-arg.template.json index d85c65a46..91fda632c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/evtsns-no-arg.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/evtsns-no-arg.template.json @@ -1,6 +1,6 @@ { "Resources": { - "testconstructEncryptionKey6153B053": { + "testconstructtestconstructKey1FB48CCA": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -54,7 +54,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "testconstructEncryptionKey6153B053", + "testconstructtestconstructKey1FB48CCA", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/manifest.json index a4a357d03..a15ae2365 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/2aa7abfd364b75fb3a76c901e1542462b6d9cf5bdce6c095a778211369e0eeba.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6669605e3e1d1ac04c68763241dd00dfa807b30aad555c89cbb22f454e0e90d1.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -82,10 +82,10 @@ "evtsns-no-arg.assets" ], "metadata": { - "/evtsns-no-arg/test-construct/EncryptionKey/Resource": [ + "/evtsns-no-arg/test-construct/'test-constructKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testconstructEncryptionKey6153B053" + "data": "testconstructtestconstructKey1FB48CCA" } ], "/evtsns-no-arg/test-construct/SnsTopic/Resource": [ @@ -117,6 +117,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testconstructEncryptionKey6153B053": [ + { + "type": "aws:cdk:logicalId", + "data": "testconstructEncryptionKey6153B053", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "evtsns-no-arg" diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/tree.json index a91e3906d..9d3dc7f9f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sns/test/integ.evtsns-no-arg.js.snapshot/tree.json @@ -12,13 +12,13 @@ "id": "test-construct", "path": "evtsns-no-arg/test-construct", "children": { - "EncryptionKey": { - "id": "EncryptionKey", - "path": "evtsns-no-arg/test-construct/EncryptionKey", + "'test-constructKey'": { + "id": "'test-constructKey'", + "path": "evtsns-no-arg/test-construct/'test-constructKey'", "children": { "Resource": { "id": "Resource", - "path": "evtsns-no-arg/test-construct/EncryptionKey/Resource", + "path": "evtsns-no-arg/test-construct/'test-constructKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -68,13 +68,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "SnsTopic": { @@ -89,7 +89,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "testconstructEncryptionKey6153B053", + "testconstructtestconstructKey1FB48CCA", "Arn" ] } @@ -97,7 +97,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -204,19 +204,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.118.0" + "version": "2.135.0" } }, "EventsRule": { @@ -263,19 +263,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-sns.EventbridgeToSns", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -291,7 +291,7 @@ "path": "evtsns-no-arg/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -303,7 +303,7 @@ "path": "evtsns-no-arg/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -311,25 +311,25 @@ "path": "evtsns-no-arg/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -337,7 +337,7 @@ "path": "evtsns-no-arg/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -345,13 +345,13 @@ "path": "evtsns-no-arg/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -359,13 +359,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/eventbridge-sqs-queue.test.ts b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/eventbridge-sqs-queue.test.ts index f8a7a79cc..97da33316 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/eventbridge-sqs-queue.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/eventbridge-sqs-queue.test.ts @@ -50,7 +50,7 @@ test('check the sqs queue properties', () => { template.hasResourceProperties('AWS::SQS::Queue', { KmsMasterKeyId: { "Fn::GetAtt": [ - "testeventbridgesqsEncryptionKey811BDC23", + "testeventbridgesqsqueueKey396E8615", "Arn" ] }, @@ -68,7 +68,7 @@ test('check the sqs queue properties', () => { test('check the sqs queue properties with existing KMS key', () => { const stack = new cdk.Stack(); - const key = defaults.buildEncryptionKey(stack, { + const key = defaults.buildEncryptionKey(stack, 'test', { description: 'my-key' }); @@ -88,7 +88,7 @@ test('check the sqs queue properties with existing KMS key', () => { template.hasResourceProperties('AWS::SQS::Queue', { KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testKey2C00E5E5", "Arn" ] }, @@ -341,7 +341,7 @@ test('check custom event bus resource with props when deploy:true', () => { test('Queue is encrypted when key is provided on queueProps.encryptionMasterKey prop', () => { const stack = new cdk.Stack(); - const key = defaults.buildEncryptionKey(stack, { + const key = defaults.buildEncryptionKey(stack, 'test', { description: 'my-key' }); @@ -360,7 +360,7 @@ test('Queue is encrypted when key is provided on queueProps.encryptionMasterKey template.hasResourceProperties('AWS::SQS::Queue', { KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testKey2C00E5E5", "Arn" ] } @@ -390,7 +390,7 @@ test('Queue is encrypted when key keyProps are provided', () => { template.hasResourceProperties('AWS::SQS::Queue', { KmsMasterKeyId: { "Fn::GetAtt": [ - "testeventbridgesqsEncryptionKey811BDC23", + "testeventbridgesqsqueueKey396E8615", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.assets.json index 0ea7470aa..9cc888c1a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "110d5034e5f4b467291448d9e01ef01321432f181fa42bd2b3f67c1d0f895d6b": { + "230982447f4c4bb2ebce07ba3a5aa73b5a03964bd0a51838283e40220f712d5a": { "source": { "path": "evtsqs-new-bus.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "110d5034e5f4b467291448d9e01ef01321432f181fa42bd2b3f67c1d0f895d6b.json", + "objectKey": "230982447f4c4bb2ebce07ba3a5aa73b5a03964bd0a51838283e40220f712d5a.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-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.template.json index bf4655145..b364a4b6e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.template.json @@ -79,7 +79,7 @@ ] } }, - "constructEncryptionKey9426451E": { + "constructqueueKey0638E1FB": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -133,7 +133,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "constructEncryptionKey9426451E", + "constructqueueKey0638E1FB", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/manifest.json index 66a9985fc..6236e5c4c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/110d5034e5f4b467291448d9e01ef01321432f181fa42bd2b3f67c1d0f895d6b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/230982447f4c4bb2ebce07ba3a5aa73b5a03964bd0a51838283e40220f712d5a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -94,10 +94,10 @@ "data": "constructdeadLetterQueuePolicyBA602BC6" } ], - "/evtsqs-new-bus/construct/EncryptionKey/Resource": [ + "/evtsqs-new-bus/construct/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "constructEncryptionKey9426451E" + "data": "constructqueueKey0638E1FB" } ], "/evtsqs-new-bus/construct/queue": [ @@ -141,6 +141,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "constructEncryptionKey9426451E": [ + { + "type": "aws:cdk:logicalId", + "data": "constructEncryptionKey9426451E", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "evtsqs-new-bus" diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/tree.json index 0dabed916..dbb062e66 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-new-bus.js.snapshot/tree.json @@ -27,7 +27,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -110,28 +110,28 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "evtsqs-new-bus/construct/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "evtsqs-new-bus/construct/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "evtsqs-new-bus/construct/EncryptionKey/Resource", + "path": "evtsqs-new-bus/construct/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -181,13 +181,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "queue": { @@ -202,7 +202,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "constructEncryptionKey9426451E", + "constructqueueKey0638E1FB", "Arn" ] }, @@ -219,7 +219,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -319,19 +319,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, "CustomEventBus": { @@ -349,13 +349,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.118.0" + "version": "2.135.0" } }, "EventsRule": { @@ -397,19 +397,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-sqs.EventbridgeToSqs", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -425,7 +425,7 @@ "path": "evtsqs-new-bus/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -437,7 +437,7 @@ "path": "evtsqs-new-bus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -445,25 +445,25 @@ "path": "evtsqs-new-bus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -471,7 +471,7 @@ "path": "evtsqs-new-bus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -479,13 +479,13 @@ "path": "evtsqs-new-bus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -493,13 +493,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.assets.json index 01410cb77..d06763525 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "47eee9752d5a54a262154a74edff0243044b59758a53f263398ae6a0369a4222": { + "125d06ce04c088a77421b180df3acc0add2a03f6403f8e8529d5eb31ed4508fb": { "source": { "path": "evtsqs-no-arg.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "47eee9752d5a54a262154a74edff0243044b59758a53f263398ae6a0369a4222.json", + "objectKey": "125d06ce04c088a77421b180df3acc0add2a03f6403f8e8529d5eb31ed4508fb.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-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.template.json index 420a56339..cd0544e6b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.template.json @@ -79,7 +79,7 @@ ] } }, - "constructEncryptionKey9426451E": { + "constructqueueKey0638E1FB": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -133,7 +133,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "constructEncryptionKey9426451E", + "constructqueueKey0638E1FB", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/manifest.json index 8a601ce96..7096d0f85 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/47eee9752d5a54a262154a74edff0243044b59758a53f263398ae6a0369a4222.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/125d06ce04c088a77421b180df3acc0add2a03f6403f8e8529d5eb31ed4508fb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -94,10 +94,10 @@ "data": "constructdeadLetterQueuePolicyBA602BC6" } ], - "/evtsqs-no-arg/construct/EncryptionKey/Resource": [ + "/evtsqs-no-arg/construct/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "constructEncryptionKey9426451E" + "data": "constructqueueKey0638E1FB" } ], "/evtsqs-no-arg/construct/queue": [ @@ -135,6 +135,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "constructEncryptionKey9426451E": [ + { + "type": "aws:cdk:logicalId", + "data": "constructEncryptionKey9426451E", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "evtsqs-no-arg" diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/tree.json index 6f0fbb0b9..556dcffc4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs/test/integ.evtsqs-no-arg.js.snapshot/tree.json @@ -27,7 +27,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -110,28 +110,28 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "evtsqs-no-arg/construct/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "evtsqs-no-arg/construct/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "evtsqs-no-arg/construct/EncryptionKey/Resource", + "path": "evtsqs-no-arg/construct/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -181,13 +181,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "queue": { @@ -202,7 +202,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "constructEncryptionKey9426451E", + "constructqueueKey0638E1FB", "Arn" ] }, @@ -219,7 +219,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -319,19 +319,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, "EventsRule": { @@ -366,19 +366,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-sqs.EventbridgeToSqs", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -394,7 +394,7 @@ "path": "evtsqs-no-arg/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -406,7 +406,7 @@ "path": "evtsqs-no-arg/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -414,25 +414,25 @@ "path": "evtsqs-no-arg/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -440,7 +440,7 @@ "path": "evtsqs-no-arg/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -448,13 +448,13 @@ "path": "evtsqs-no-arg/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -462,13 +462,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/lib/index.ts index ccae9849c..1c3962679 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/lib/index.ts @@ -185,7 +185,7 @@ export class FargateToSns extends Construct { } // Setup the SNS topic - const buildTopicResponse = defaults.buildTopic(this, { + const buildTopicResponse = defaults.buildTopic(this, id, { existingTopicObj: props.existingTopicObject, topicProps: props.topicProps, enableEncryptionWithCustomerManagedKey: props.enableEncryptionWithCustomerManagedKey, diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/fargate-sns.test.ts b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/fargate-sns.test.ts index a556cccee..8a09f3553 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/fargate-sns.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/fargate-sns.test.ts @@ -432,7 +432,7 @@ test('Topic is encrypted with provided encryptionKeyProps', () => { template.hasResourceProperties('AWS::SNS::Topic', { KmsMasterKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructtestconstructKey1FB48CCA', 'Arn' ] }, @@ -442,7 +442,7 @@ test('Topic is encrypted with provided encryptionKeyProps', () => { AliasName: 'alias/new-key-alias-from-props', TargetKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructtestconstructKey1FB48CCA', 'Arn' ] } @@ -491,7 +491,7 @@ test('Topic is encrypted with customer managed KMS Key when enable encryption fl template.hasResourceProperties('AWS::SNS::Topic', { KmsMasterKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructtestconstructKey1FB48CCA', 'Arn' ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/fargate-sqs.test.ts b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/fargate-sqs.test.ts index caa8f921c..ba2387df0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/fargate-sqs.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/fargate-sqs.test.ts @@ -574,7 +574,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { AliasName: 'alias/new-key-alias-from-props', TargetKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructtestconstructqueueKey3FE2A0B7', 'Arn' ] } @@ -612,7 +612,7 @@ test('Queue is encrypted with customer managed KMS Key when enable encryption fl template.hasResourceProperties("AWS::SQS::Queue", { KmsMasterKeyId: { "Fn::GetAtt": [ - "testconstructEncryptionKey6153B053", + "testconstructtestconstructqueueKey3FE2A0B7", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/iotsqs-custom-max-receive-count.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/iotsqs-custom-max-receive-count.assets.json index d1caae567..067d7a84a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/iotsqs-custom-max-receive-count.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/iotsqs-custom-max-receive-count.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "e5dd81090e0ae5d0c366e2c419e9d56428808d51a057d66718b736df170f8211": { + "635160d7f438f753892dc505324ac39805452322466b3d65aef0bfabc328e592": { "source": { "path": "iotsqs-custom-max-receive-count.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e5dd81090e0ae5d0c366e2c419e9d56428808d51a057d66718b736df170f8211.json", + "objectKey": "635160d7f438f753892dc505324ac39805452322466b3d65aef0bfabc328e592.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-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/iotsqs-custom-max-receive-count.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/iotsqs-custom-max-receive-count.template.json index 5dcd5e96d..e8ec550fe 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/iotsqs-custom-max-receive-count.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/iotsqs-custom-max-receive-count.template.json @@ -81,7 +81,7 @@ ] } }, - "testiotsqsstackEncryptionKeyAB09201B": { + "testiotsqsstackqueueKey077AA61D": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -148,7 +148,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] }, @@ -283,7 +283,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/manifest.json index b67ffb0b0..e251c717e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/e5dd81090e0ae5d0c366e2c419e9d56428808d51a057d66718b736df170f8211.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/635160d7f438f753892dc505324ac39805452322466b3d65aef0bfabc328e592.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -94,10 +94,10 @@ "data": "testiotsqsstackdeadLetterQueuePolicyD0F4B7D3" } ], - "/iotsqs-custom-max-receive-count/test-iot-sqs-stack/EncryptionKey/Resource": [ + "/iotsqs-custom-max-receive-count/test-iot-sqs-stack/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testiotsqsstackEncryptionKeyAB09201B" + "data": "testiotsqsstackqueueKey077AA61D" } ], "/iotsqs-custom-max-receive-count/test-iot-sqs-stack/queue": [ @@ -147,6 +147,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testiotsqsstackEncryptionKeyAB09201B": [ + { + "type": "aws:cdk:logicalId", + "data": "testiotsqsstackEncryptionKeyAB09201B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "iotsqs-custom-max-receive-count" diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/tree.json index d0a920858..6dea7ec42 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-custom-max-receive-count.js.snapshot/tree.json @@ -28,7 +28,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -111,28 +111,28 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "iotsqs-custom-max-receive-count/test-iot-sqs-stack/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "iotsqs-custom-max-receive-count/test-iot-sqs-stack/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "iotsqs-custom-max-receive-count/test-iot-sqs-stack/EncryptionKey/Resource", + "path": "iotsqs-custom-max-receive-count/test-iot-sqs-stack/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -195,13 +195,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "queue": { @@ -216,7 +216,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] }, @@ -234,7 +234,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -317,19 +317,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, "iot-actions-role": { @@ -341,7 +341,7 @@ "path": "iotsqs-custom-max-receive-count/test-iot-sqs-stack/iot-actions-role/Importiot-actions-role", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -366,7 +366,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -405,7 +405,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } @@ -423,19 +423,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "IotTopicRule": { @@ -468,13 +468,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-sqs.IotToSqs", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -490,7 +490,7 @@ "path": "iotsqs-custom-max-receive-count/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -502,7 +502,7 @@ "path": "iotsqs-custom-max-receive-count/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -510,25 +510,25 @@ "path": "iotsqs-custom-max-receive-count/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -536,7 +536,7 @@ "path": "iotsqs-custom-max-receive-count/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -544,13 +544,13 @@ "path": "iotsqs-custom-max-receive-count/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -558,13 +558,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/iotsqs-dead-letter-queue-off.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/iotsqs-dead-letter-queue-off.assets.json index 4110d050e..443a85b4b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/iotsqs-dead-letter-queue-off.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/iotsqs-dead-letter-queue-off.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "c53fa038c848653ec631f7bfbc5526ceea1f11274ee9b46709f0ece8a605fc5d": { + "918186a79b7a7ccf68cda9e7cbe4edf4356b6c19e720b7245065646c7bdb8672": { "source": { "path": "iotsqs-dead-letter-queue-off.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c53fa038c848653ec631f7bfbc5526ceea1f11274ee9b46709f0ece8a605fc5d.json", + "objectKey": "918186a79b7a7ccf68cda9e7cbe4edf4356b6c19e720b7245065646c7bdb8672.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-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/iotsqs-dead-letter-queue-off.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/iotsqs-dead-letter-queue-off.template.json index 4898b1def..0112cba86 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/iotsqs-dead-letter-queue-off.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/iotsqs-dead-letter-queue-off.template.json @@ -1,7 +1,7 @@ { "Description": "Integration Test for aws-iot-sqs", "Resources": { - "testiotsqsstackEncryptionKeyAB09201B": { + "testiotsqsstackqueueKey077AA61D": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -68,7 +68,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] }, @@ -194,7 +194,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/manifest.json index ade7a1440..733363d4d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/c53fa038c848653ec631f7bfbc5526ceea1f11274ee9b46709f0ece8a605fc5d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/918186a79b7a7ccf68cda9e7cbe4edf4356b6c19e720b7245065646c7bdb8672.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -82,10 +82,10 @@ "iotsqs-dead-letter-queue-off.assets" ], "metadata": { - "/iotsqs-dead-letter-queue-off/test-iot-sqs-stack/EncryptionKey/Resource": [ + "/iotsqs-dead-letter-queue-off/test-iot-sqs-stack/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testiotsqsstackEncryptionKeyAB09201B" + "data": "testiotsqsstackqueueKey077AA61D" } ], "/iotsqs-dead-letter-queue-off/test-iot-sqs-stack/queue": [ @@ -135,6 +135,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testiotsqsstackEncryptionKeyAB09201B": [ + { + "type": "aws:cdk:logicalId", + "data": "testiotsqsstackEncryptionKeyAB09201B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "iotsqs-dead-letter-queue-off" diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/tree.json index 5c977a294..9c9488851 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-dead-letter-queue-off.js.snapshot/tree.json @@ -12,13 +12,13 @@ "id": "test-iot-sqs-stack", "path": "iotsqs-dead-letter-queue-off/test-iot-sqs-stack", "children": { - "EncryptionKey": { - "id": "EncryptionKey", - "path": "iotsqs-dead-letter-queue-off/test-iot-sqs-stack/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "iotsqs-dead-letter-queue-off/test-iot-sqs-stack/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "iotsqs-dead-letter-queue-off/test-iot-sqs-stack/EncryptionKey/Resource", + "path": "iotsqs-dead-letter-queue-off/test-iot-sqs-stack/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -81,13 +81,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "queue": { @@ -102,7 +102,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] }, @@ -111,7 +111,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -194,19 +194,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, "iot-actions-role": { @@ -218,7 +218,7 @@ "path": "iotsqs-dead-letter-queue-off/test-iot-sqs-stack/iot-actions-role/Importiot-actions-role", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -282,7 +282,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } @@ -300,19 +300,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "IotTopicRule": { @@ -345,13 +345,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-sqs.IotToSqs", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -367,7 +367,7 @@ "path": "iotsqs-dead-letter-queue-off/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -379,7 +379,7 @@ "path": "iotsqs-dead-letter-queue-off/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -387,25 +387,25 @@ "path": "iotsqs-dead-letter-queue-off/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -413,7 +413,7 @@ "path": "iotsqs-dead-letter-queue-off/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -421,13 +421,13 @@ "path": "iotsqs-dead-letter-queue-off/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -435,13 +435,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/iotsqs-default-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/iotsqs-default-arguments.assets.json index 20950b6d7..a0001e543 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/iotsqs-default-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/iotsqs-default-arguments.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "05fa544bd06b0297cd8434eb4f824cf6bcd5462fed11677305792690f6aa022e": { + "902a33b7ce4ddb47244fc7d63c8934696e4d761ce3cc13b277bc4bcc25498473": { "source": { "path": "iotsqs-default-arguments.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "05fa544bd06b0297cd8434eb4f824cf6bcd5462fed11677305792690f6aa022e.json", + "objectKey": "902a33b7ce4ddb47244fc7d63c8934696e4d761ce3cc13b277bc4bcc25498473.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-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/iotsqs-default-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/iotsqs-default-arguments.template.json index edb25e849..3f7dad46a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/iotsqs-default-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/iotsqs-default-arguments.template.json @@ -80,7 +80,7 @@ ] } }, - "testiotsqsstackEncryptionKeyAB09201B": { + "testiotsqsstackqueueKey077AA61D": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -147,7 +147,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] }, @@ -281,7 +281,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/manifest.json index f203ffc95..2c530be75 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/05fa544bd06b0297cd8434eb4f824cf6bcd5462fed11677305792690f6aa022e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/902a33b7ce4ddb47244fc7d63c8934696e4d761ce3cc13b277bc4bcc25498473.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -94,10 +94,10 @@ "data": "testiotsqsstackdeadLetterQueuePolicyD0F4B7D3" } ], - "/iotsqs-default-arguments/test-iot-sqs-stack/EncryptionKey/Resource": [ + "/iotsqs-default-arguments/test-iot-sqs-stack/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testiotsqsstackEncryptionKeyAB09201B" + "data": "testiotsqsstackqueueKey077AA61D" } ], "/iotsqs-default-arguments/test-iot-sqs-stack/queue": [ @@ -147,6 +147,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testiotsqsstackEncryptionKeyAB09201B": [ + { + "type": "aws:cdk:logicalId", + "data": "testiotsqsstackEncryptionKeyAB09201B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "iotsqs-default-arguments" diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/tree.json index 8ddc8c398..d45cfebac 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-default-arguments.js.snapshot/tree.json @@ -27,7 +27,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -110,28 +110,28 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "iotsqs-default-arguments/test-iot-sqs-stack/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "iotsqs-default-arguments/test-iot-sqs-stack/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "iotsqs-default-arguments/test-iot-sqs-stack/EncryptionKey/Resource", + "path": "iotsqs-default-arguments/test-iot-sqs-stack/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -194,13 +194,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "queue": { @@ -215,7 +215,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] }, @@ -232,7 +232,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -315,19 +315,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, "iot-actions-role": { @@ -339,7 +339,7 @@ "path": "iotsqs-default-arguments/test-iot-sqs-stack/iot-actions-role/Importiot-actions-role", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -364,7 +364,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -403,7 +403,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } @@ -421,19 +421,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "IotTopicRule": { @@ -466,13 +466,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-sqs.IotToSqs", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -488,7 +488,7 @@ "path": "iotsqs-default-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -500,7 +500,7 @@ "path": "iotsqs-default-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -508,25 +508,25 @@ "path": "iotsqs-default-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -534,7 +534,7 @@ "path": "iotsqs-default-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -542,13 +542,13 @@ "path": "iotsqs-default-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -556,13 +556,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/iotsqs-use-kms-key-props.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/iotsqs-use-kms-key-props.assets.json index 6e92cf017..fea516570 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/iotsqs-use-kms-key-props.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/iotsqs-use-kms-key-props.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "c852f21bd9d311a8af41f61d8efbbccc6bc1c1903e5b8ad27951a141189aa5a0": { + "8a6a1dd419bec167f76681aa4737672b4e7552a26d67c990e512393bef3ac357": { "source": { "path": "iotsqs-use-kms-key-props.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c852f21bd9d311a8af41f61d8efbbccc6bc1c1903e5b8ad27951a141189aa5a0.json", + "objectKey": "8a6a1dd419bec167f76681aa4737672b4e7552a26d67c990e512393bef3ac357.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-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/iotsqs-use-kms-key-props.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/iotsqs-use-kms-key-props.template.json index 8925a5fed..2eb6b4cd6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/iotsqs-use-kms-key-props.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/iotsqs-use-kms-key-props.template.json @@ -80,7 +80,7 @@ ] } }, - "testiotsqsstackEncryptionKeyAB09201B": { + "testiotsqsstackqueueKey077AA61D": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -142,13 +142,13 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "testiotsqsstackEncryptionKeyAlias45D0FE2E": { + "testiotsqsstackqueueKeyAliasB4280862": { "Type": "AWS::KMS::Alias", "Properties": { "AliasName": "alias/new-key-alias-from-props", "TargetKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } @@ -159,7 +159,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] }, @@ -293,7 +293,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/manifest.json index 0611afa4d..94ebc8767 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/c852f21bd9d311a8af41f61d8efbbccc6bc1c1903e5b8ad27951a141189aa5a0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8a6a1dd419bec167f76681aa4737672b4e7552a26d67c990e512393bef3ac357.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -94,16 +94,16 @@ "data": "testiotsqsstackdeadLetterQueuePolicyD0F4B7D3" } ], - "/iotsqs-use-kms-key-props/test-iot-sqs-stack/EncryptionKey/Resource": [ + "/iotsqs-use-kms-key-props/test-iot-sqs-stack/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testiotsqsstackEncryptionKeyAB09201B" + "data": "testiotsqsstackqueueKey077AA61D" } ], - "/iotsqs-use-kms-key-props/test-iot-sqs-stack/EncryptionKey/Alias/Resource": [ + "/iotsqs-use-kms-key-props/test-iot-sqs-stack/'queueKey'/Alias/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testiotsqsstackEncryptionKeyAlias45D0FE2E" + "data": "testiotsqsstackqueueKeyAliasB4280862" } ], "/iotsqs-use-kms-key-props/test-iot-sqs-stack/queue": [ @@ -153,6 +153,24 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testiotsqsstackEncryptionKeyAB09201B": [ + { + "type": "aws:cdk:logicalId", + "data": "testiotsqsstackEncryptionKeyAB09201B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "testiotsqsstackEncryptionKeyAlias45D0FE2E": [ + { + "type": "aws:cdk:logicalId", + "data": "testiotsqsstackEncryptionKeyAlias45D0FE2E", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "iotsqs-use-kms-key-props" diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/tree.json index 0854eca52..3e36a7149 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-kms-key-props.js.snapshot/tree.json @@ -27,7 +27,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -110,28 +110,28 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "iotsqs-use-kms-key-props/test-iot-sqs-stack/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "iotsqs-use-kms-key-props/test-iot-sqs-stack/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "iotsqs-use-kms-key-props/test-iot-sqs-stack/EncryptionKey/Resource", + "path": "iotsqs-use-kms-key-props/test-iot-sqs-stack/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -194,23 +194,23 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } }, "Alias": { "id": "Alias", - "path": "iotsqs-use-kms-key-props/test-iot-sqs-stack/EncryptionKey/Alias", + "path": "iotsqs-use-kms-key-props/test-iot-sqs-stack/'queueKey'/Alias", "children": { "Resource": { "id": "Resource", - "path": "iotsqs-use-kms-key-props/test-iot-sqs-stack/EncryptionKey/Alias/Resource", + "path": "iotsqs-use-kms-key-props/test-iot-sqs-stack/'queueKey'/Alias/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Alias", "aws:cdk:cloudformation:props": { "aliasName": "alias/new-key-alias-from-props", "targetKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } @@ -218,19 +218,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnAlias", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Alias", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "queue": { @@ -245,7 +245,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] }, @@ -262,7 +262,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -345,19 +345,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, "iot-actions-role": { @@ -369,7 +369,7 @@ "path": "iotsqs-use-kms-key-props/test-iot-sqs-stack/iot-actions-role/Importiot-actions-role", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -394,7 +394,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -433,7 +433,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } @@ -451,19 +451,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "IotTopicRule": { @@ -496,13 +496,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-sqs.IotToSqs", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -518,7 +518,7 @@ "path": "iotsqs-use-kms-key-props/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -530,7 +530,7 @@ "path": "iotsqs-use-kms-key-props/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -538,25 +538,25 @@ "path": "iotsqs-use-kms-key-props/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -564,7 +564,7 @@ "path": "iotsqs-use-kms-key-props/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -572,13 +572,13 @@ "path": "iotsqs-use-kms-key-props/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -586,13 +586,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/iotsqs-use-queue-props.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/iotsqs-use-queue-props.assets.json index af709b0e8..d9d287b7c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/iotsqs-use-queue-props.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/iotsqs-use-queue-props.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "14cf304aa246a6004b4c329ba964e9c3394a9d11b1c376fa4d40886d6590e495": { + "7fdd1d3c2f19ccc39f555cfef1bca298d0ceb465581088bbf4d4f649184c8268": { "source": { "path": "iotsqs-use-queue-props.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "14cf304aa246a6004b4c329ba964e9c3394a9d11b1c376fa4d40886d6590e495.json", + "objectKey": "7fdd1d3c2f19ccc39f555cfef1bca298d0ceb465581088bbf4d4f649184c8268.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-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/iotsqs-use-queue-props.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/iotsqs-use-queue-props.template.json index 3f6b1eb22..76d2e1470 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/iotsqs-use-queue-props.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/iotsqs-use-queue-props.template.json @@ -81,7 +81,7 @@ ] } }, - "testiotsqsstackEncryptionKeyAB09201B": { + "testiotsqsstackqueueKey077AA61D": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -148,7 +148,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] }, @@ -283,7 +283,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/manifest.json index f4f549592..2eb4a18f9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/14cf304aa246a6004b4c329ba964e9c3394a9d11b1c376fa4d40886d6590e495.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7fdd1d3c2f19ccc39f555cfef1bca298d0ceb465581088bbf4d4f649184c8268.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -94,10 +94,10 @@ "data": "testiotsqsstackdeadLetterQueuePolicyD0F4B7D3" } ], - "/iotsqs-use-queue-props/test-iot-sqs-stack/EncryptionKey/Resource": [ + "/iotsqs-use-queue-props/test-iot-sqs-stack/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testiotsqsstackEncryptionKeyAB09201B" + "data": "testiotsqsstackqueueKey077AA61D" } ], "/iotsqs-use-queue-props/test-iot-sqs-stack/queue": [ @@ -147,6 +147,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testiotsqsstackEncryptionKeyAB09201B": [ + { + "type": "aws:cdk:logicalId", + "data": "testiotsqsstackEncryptionKeyAB09201B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "iotsqs-use-queue-props" diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/tree.json index a6064480b..84af6ed86 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/integ.iotsqs-use-queue-props.js.snapshot/tree.json @@ -28,7 +28,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -111,28 +111,28 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "iotsqs-use-queue-props/test-iot-sqs-stack/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "iotsqs-use-queue-props/test-iot-sqs-stack/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "iotsqs-use-queue-props/test-iot-sqs-stack/EncryptionKey/Resource", + "path": "iotsqs-use-queue-props/test-iot-sqs-stack/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -195,13 +195,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "queue": { @@ -216,7 +216,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] }, @@ -234,7 +234,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -317,19 +317,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, "iot-actions-role": { @@ -341,7 +341,7 @@ "path": "iotsqs-use-queue-props/test-iot-sqs-stack/iot-actions-role/Importiot-actions-role", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -366,7 +366,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -405,7 +405,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testiotsqsstackEncryptionKeyAB09201B", + "testiotsqsstackqueueKey077AA61D", "Arn" ] } @@ -423,19 +423,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "IotTopicRule": { @@ -468,13 +468,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-sqs.IotToSqs", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -490,7 +490,7 @@ "path": "iotsqs-use-queue-props/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -502,7 +502,7 @@ "path": "iotsqs-use-queue-props/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -510,25 +510,25 @@ "path": "iotsqs-use-queue-props/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -536,7 +536,7 @@ "path": "iotsqs-use-queue-props/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -544,13 +544,13 @@ "path": "iotsqs-use-queue-props/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -558,13 +558,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/iot-sqs.test.ts b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/iot-sqs.test.ts index 201465b17..546ae5e28 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/iot-sqs.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-iot-sqs/test/iot-sqs.test.ts @@ -39,7 +39,7 @@ test('Pattern deployment with default props', () => { template.hasResourceProperties("AWS::SQS::Queue", { KmsMasterKeyId: { "Fn::GetAtt": [ - "testiotsqsEncryptionKey64EE64B1", + "testiotsqsqueueKeyC5935B79", "Arn" ] } @@ -434,7 +434,7 @@ test('Pattern deployment passing KMS key props', () => { template.hasResourceProperties("AWS::SQS::Queue", { KmsMasterKeyId: { "Fn::GetAtt": [ - "testiotsqsEncryptionKey64EE64B1", + "testiotsqsqueueKeyC5935B79", "Arn" ] } @@ -476,7 +476,7 @@ test('Pattern deployment passing KMS key props', () => { AliasName: "alias/new-key-alias-from-props", TargetKeyId: { "Fn::GetAtt": [ - "testiotsqsEncryptionKey64EE64B1", + "testiotsqsqueueKeyC5935B79", "Arn", ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/lib/index.ts index e5233aaa0..e99d0849d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/lib/index.ts @@ -131,6 +131,7 @@ export class LambdaToSagemakerEndpoint extends Construct { // Build SageMaker Endpoint (inclduing SageMaker's Endpoint Configuration and Model) const buildSagemakerEndpointResponse = defaults.BuildSagemakerEndpoint( this, + id, { ...props, vpc: this.vpc, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/aws-lambda-sagemakerendpoint.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/aws-lambda-sagemakerendpoint.test.ts index ac1eaa3b8..c0a3efec8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/aws-lambda-sagemakerendpoint.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/aws-lambda-sagemakerendpoint.test.ts @@ -108,7 +108,7 @@ test('Pattern deployment with new Lambda function, new Sagemaker endpoint, deplo }, ], KmsKeyId: { - Ref: 'testlambdasagemakerEncryptionKey2AACF9E0', + Ref: 'testlambdasagemakertestlambdasagemakerKey5BF0746F', }, }); @@ -485,7 +485,7 @@ test('Test getter methods: new Lambda function, existingSagemakerendpointObj (no // Initial Setup const stack = new Stack(); - const deploySagemakerEndpointResponse = defaults.deploySagemakerEndpoint(stack, { + const deploySagemakerEndpointResponse = defaults.deploySagemakerEndpoint(stack, 'test', { modelProps: { primaryContainer: { image: '.dkr.ecr..amazonaws.com/linear-learner:latest', @@ -520,7 +520,7 @@ test('Test getter methods: new Lambda function, existingSagemakerendpointObj and // Initial Setup const stack = new Stack(); - const deploySagemakerEndpointResponse = defaults.deploySagemakerEndpoint(stack, { + const deploySagemakerEndpointResponse = defaults.deploySagemakerEndpoint(stack, 'test', { modelProps: { primaryContainer: { image: '.dkr.ecr..amazonaws.com/linear-learner:latest', @@ -557,7 +557,7 @@ test('Test lambda function custom environment variable', () => { const stack = new Stack(); // Helper declaration - const deploySagemakerEndpointResponse = defaults.deploySagemakerEndpoint(stack, { + const deploySagemakerEndpointResponse = defaults.deploySagemakerEndpoint(stack, 'test', { modelProps: { primaryContainer: { image: '.dkr.ecr..amazonaws.com/linear-learner:latest', @@ -626,7 +626,7 @@ test('Confirm call to CheckLambdaProps', () => { test('Confirm call to CheckSagemakerProps', () => { // Initial Setup const stack = new Stack(); - const deploySagemakerEndpointResponse = defaults.deploySagemakerEndpoint(stack, { + const deploySagemakerEndpointResponse = defaults.deploySagemakerEndpoint(stack, 'test', { modelProps: { primaryContainer: { image: '.dkr.ecr..amazonaws.com/linear-learner:latest', diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/lamsag-deployFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/lamsag-deployFunction.assets.json index f516c648c..f63661f9a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/lamsag-deployFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/lamsag-deployFunction.assets.json @@ -27,7 +27,7 @@ } } }, - "e7e0a1b12a31e1e85080179b09df265b6652494f525a34319aa8b86123555964": { + "5c9d5d2dbb170ac984547dcb25dd08c6c5a0f66cdd68920e2fb328fd21226214": { "source": { "path": "lamsag-deployFunction.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e7e0a1b12a31e1e85080179b09df265b6652494f525a34319aa8b86123555964.json", + "objectKey": "5c9d5d2dbb170ac984547dcb25dd08c6c5a0f66cdd68920e2fb328fd21226214.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-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/lamsag-deployFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/lamsag-deployFunction.template.json index cc922d8ec..86807cb81 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/lamsag-deployFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/lamsag-deployFunction.template.json @@ -333,7 +333,7 @@ "testlambdasagemakerSagemakerRoleD84546B8" ] }, - "testlambdasagemakerEncryptionKey2AACF9E0": { + "testlambdasagemakertestlambdasagemakerKey5BF0746F": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -373,7 +373,7 @@ "Type": "AWS::SageMaker::EndpointConfig", "Properties": { "KmsKeyId": { - "Ref": "testlambdasagemakerEncryptionKey2AACF9E0" + "Ref": "testlambdasagemakertestlambdasagemakerKey5BF0746F" }, "ProductionVariants": [ { diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/manifest.json index 75ef3f684..7d88f1681 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/e7e0a1b12a31e1e85080179b09df265b6652494f525a34319aa8b86123555964.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5c9d5d2dbb170ac984547dcb25dd08c6c5a0f66cdd68920e2fb328fd21226214.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -106,16 +106,19 @@ "data": "testlambdasagemakerSagemakerModelEC3E4E39" } ], - "/lamsag-deployFunction/test-lambda-sagemaker/EncryptionKey/Resource": [ + "/lamsag-deployFunction/test-lambda-sagemaker/'test-lambda-sagemakerKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testlambdasagemakerEncryptionKey2AACF9E0" + "data": "testlambdasagemakertestlambdasagemakerKey5BF0746F" } ], "/lamsag-deployFunction/test-lambda-sagemaker/SagemakerEndpointConfig": [ { "type": "aws:cdk:logicalId", - "data": "testlambdasagemakerSagemakerEndpointConfig6BABA334" + "data": "testlambdasagemakerSagemakerEndpointConfig6BABA334", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] } ], "/lamsag-deployFunction/test-lambda-sagemaker/SagemakerEndpoint": [ @@ -153,6 +156,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testlambdasagemakerEncryptionKey2AACF9E0": [ + { + "type": "aws:cdk:logicalId", + "data": "testlambdasagemakerEncryptionKey2AACF9E0", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "lamsag-deployFunction" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/tree.json index a4930a3be..1b629f321 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-deployFunction.js.snapshot/tree.json @@ -13,7 +13,7 @@ "path": "lamsag-deployFunction/mappings", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.118.0" + "version": "2.135.0" } }, "SampleAsset": { @@ -25,7 +25,7 @@ "path": "lamsag-deployFunction/SampleAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.135.0" } }, "AssetBucket": { @@ -33,13 +33,13 @@ "path": "lamsag-deployFunction/SampleAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.135.0" } }, "test-lambda-sagemaker": { @@ -55,7 +55,7 @@ "path": "lamsag-deployFunction/test-lambda-sagemaker/SagemakerRole/ImportSagemakerRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -297,19 +297,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "SagemakerModel": { @@ -342,16 +342,16 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sagemaker.CfnModel", - "version": "2.118.0" + "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "lamsag-deployFunction/test-lambda-sagemaker/EncryptionKey", + "'test-lambda-sagemakerKey'": { + "id": "'test-lambda-sagemakerKey'", + "path": "lamsag-deployFunction/test-lambda-sagemaker/'test-lambda-sagemakerKey'", "children": { "Resource": { "id": "Resource", - "path": "lamsag-deployFunction/test-lambda-sagemaker/EncryptionKey/Resource", + "path": "lamsag-deployFunction/test-lambda-sagemaker/'test-lambda-sagemakerKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -388,13 +388,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "SagemakerEndpointConfig": { @@ -404,7 +404,7 @@ "aws:cdk:cloudformation:type": "AWS::SageMaker::EndpointConfig", "aws:cdk:cloudformation:props": { "kmsKeyId": { - "Ref": "testlambdasagemakerEncryptionKey2AACF9E0" + "Ref": "testlambdasagemakertestlambdasagemakerKey5BF0746F" }, "productionVariants": [ { @@ -424,7 +424,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sagemaker.CfnEndpointConfig", - "version": "2.118.0" + "version": "2.135.0" } }, "SagemakerEndpoint": { @@ -443,7 +443,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sagemaker.CfnEndpoint", - "version": "2.118.0" + "version": "2.135.0" } }, "LambdaFunctionServiceRole": { @@ -455,7 +455,7 @@ "path": "lamsag-deployFunction/test-lambda-sagemaker/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -518,7 +518,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -561,19 +561,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "LambdaFunction": { @@ -589,7 +589,7 @@ "path": "lamsag-deployFunction/test-lambda-sagemaker/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.135.0" } }, "AssetBucket": { @@ -597,13 +597,13 @@ "path": "lamsag-deployFunction/test-lambda-sagemaker/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -645,19 +645,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sagemakerendpoint.LambdaToSagemakerEndpoint", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -673,7 +673,7 @@ "path": "lamsag-deployFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -685,7 +685,7 @@ "path": "lamsag-deployFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -693,25 +693,25 @@ "path": "lamsag-deployFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -719,7 +719,7 @@ "path": "lamsag-deployFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -727,13 +727,13 @@ "path": "lamsag-deployFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -741,13 +741,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/lamsag-existingFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/lamsag-existingFunction.assets.json index 7bb34ab39..880c17b13 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/lamsag-existingFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/lamsag-existingFunction.assets.json @@ -27,7 +27,7 @@ } } }, - "2d5ec2e1b34d6a31bd837355c8f5ea2be443ac481b4611398e9dae6efa921f46": { + "97ddc3e7bdd8bbc8186a37a98d66500c4e8c2280bdf6dd8e5a45f4dcba8e3f35": { "source": { "path": "lamsag-existingFunction.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2d5ec2e1b34d6a31bd837355c8f5ea2be443ac481b4611398e9dae6efa921f46.json", + "objectKey": "97ddc3e7bdd8bbc8186a37a98d66500c4e8c2280bdf6dd8e5a45f4dcba8e3f35.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-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/lamsag-existingFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/lamsag-existingFunction.template.json index 39063295f..8c32722d0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/lamsag-existingFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/lamsag-existingFunction.template.json @@ -418,7 +418,7 @@ "testlambdasagemakerSagemakerRoleD84546B8" ] }, - "testlambdasagemakerEncryptionKey2AACF9E0": { + "testlambdasagemakertestlambdasagemakerKey5BF0746F": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -458,7 +458,7 @@ "Type": "AWS::SageMaker::EndpointConfig", "Properties": { "KmsKeyId": { - "Ref": "testlambdasagemakerEncryptionKey2AACF9E0" + "Ref": "testlambdasagemakertestlambdasagemakerKey5BF0746F" }, "ProductionVariants": [ { diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/manifest.json index d873741d4..07a43f266 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/2d5ec2e1b34d6a31bd837355c8f5ea2be443ac481b4611398e9dae6efa921f46.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/97ddc3e7bdd8bbc8186a37a98d66500c4e8c2280bdf6dd8e5a45f4dcba8e3f35.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -124,16 +124,19 @@ "data": "testlambdasagemakerSagemakerModelEC3E4E39" } ], - "/lamsag-existingFunction/test-lambda-sagemaker/EncryptionKey/Resource": [ + "/lamsag-existingFunction/test-lambda-sagemaker/'test-lambda-sagemakerKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testlambdasagemakerEncryptionKey2AACF9E0" + "data": "testlambdasagemakertestlambdasagemakerKey5BF0746F" } ], "/lamsag-existingFunction/test-lambda-sagemaker/SagemakerEndpointConfig": [ { "type": "aws:cdk:logicalId", - "data": "testlambdasagemakerSagemakerEndpointConfig6BABA334" + "data": "testlambdasagemakerSagemakerEndpointConfig6BABA334", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] } ], "/lamsag-existingFunction/test-lambda-sagemaker/SagemakerEndpoint": [ @@ -153,6 +156,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testlambdasagemakerEncryptionKey2AACF9E0": [ + { + "type": "aws:cdk:logicalId", + "data": "testlambdasagemakerEncryptionKey2AACF9E0", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "lamsag-existingFunction" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/tree.json index fbd1417c4..7675be4d9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamsag-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -123,19 +123,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "LambdaFunction": { @@ -151,7 +151,7 @@ "path": "lamsag-existingFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.135.0" } }, "AssetBucket": { @@ -159,13 +159,13 @@ "path": "lamsag-existingFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -207,13 +207,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.135.0" } }, "mappings": { @@ -221,7 +221,7 @@ "path": "lamsag-existingFunction/mappings", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.118.0" + "version": "2.135.0" } }, "SampleAsset": { @@ -233,7 +233,7 @@ "path": "lamsag-existingFunction/SampleAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.135.0" } }, "AssetBucket": { @@ -241,13 +241,13 @@ "path": "lamsag-existingFunction/SampleAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.135.0" } }, "test-lambda-sagemaker": { @@ -263,7 +263,7 @@ "path": "lamsag-existingFunction/test-lambda-sagemaker/SagemakerRole/ImportSagemakerRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -288,7 +288,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -505,19 +505,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "SagemakerModel": { @@ -550,16 +550,16 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sagemaker.CfnModel", - "version": "2.118.0" + "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "lamsag-existingFunction/test-lambda-sagemaker/EncryptionKey", + "'test-lambda-sagemakerKey'": { + "id": "'test-lambda-sagemakerKey'", + "path": "lamsag-existingFunction/test-lambda-sagemaker/'test-lambda-sagemakerKey'", "children": { "Resource": { "id": "Resource", - "path": "lamsag-existingFunction/test-lambda-sagemaker/EncryptionKey/Resource", + "path": "lamsag-existingFunction/test-lambda-sagemaker/'test-lambda-sagemakerKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -596,13 +596,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "SagemakerEndpointConfig": { @@ -612,7 +612,7 @@ "aws:cdk:cloudformation:type": "AWS::SageMaker::EndpointConfig", "aws:cdk:cloudformation:props": { "kmsKeyId": { - "Ref": "testlambdasagemakerEncryptionKey2AACF9E0" + "Ref": "testlambdasagemakertestlambdasagemakerKey5BF0746F" }, "productionVariants": [ { @@ -632,7 +632,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sagemaker.CfnEndpointConfig", - "version": "2.118.0" + "version": "2.135.0" } }, "SagemakerEndpoint": { @@ -651,13 +651,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sagemaker.CfnEndpoint", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sagemakerendpoint.LambdaToSagemakerEndpoint", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -673,7 +673,7 @@ "path": "lamsag-existingFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -685,7 +685,7 @@ "path": "lamsag-existingFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -693,25 +693,25 @@ "path": "lamsag-existingFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -719,7 +719,7 @@ "path": "lamsag-existingFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -727,13 +727,13 @@ "path": "lamsag-existingFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -741,13 +741,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/lamsag-existingSageMakerEndpoint.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/lamsag-existingSageMakerEndpoint.assets.json index 20de98063..006c72168 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/lamsag-existingSageMakerEndpoint.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/lamsag-existingSageMakerEndpoint.assets.json @@ -27,7 +27,7 @@ } } }, - "23bc9581ff80cb00aefd94df87855ad3fa92b07b0291e84c37c4e16cdbd6e130": { + "f01bf77bf7fc43e5afb8bf0024066fbfce2e9128bcb925a7f22bc0094094762e": { "source": { "path": "lamsag-existingSageMakerEndpoint.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "23bc9581ff80cb00aefd94df87855ad3fa92b07b0291e84c37c4e16cdbd6e130.json", + "objectKey": "f01bf77bf7fc43e5afb8bf0024066fbfce2e9128bcb925a7f22bc0094094762e.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-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/lamsag-existingSageMakerEndpoint.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/lamsag-existingSageMakerEndpoint.template.json index a8673eec4..cc8bbd7bd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/lamsag-existingSageMakerEndpoint.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/lamsag-existingSageMakerEndpoint.template.json @@ -333,7 +333,7 @@ "SagemakerRole5FDB64E1" ] }, - "EncryptionKey1B843E66": { + "testKey2C00E5E5": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -373,7 +373,7 @@ "Type": "AWS::SageMaker::EndpointConfig", "Properties": { "KmsKeyId": { - "Ref": "EncryptionKey1B843E66" + "Ref": "testKey2C00E5E5" }, "ProductionVariants": [ { diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/manifest.json index e86cd9266..bfba95131 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/23bc9581ff80cb00aefd94df87855ad3fa92b07b0291e84c37c4e16cdbd6e130.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f01bf77bf7fc43e5afb8bf0024066fbfce2e9128bcb925a7f22bc0094094762e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -106,16 +106,19 @@ "data": "SagemakerModel" } ], - "/lamsag-existingSageMakerEndpoint/EncryptionKey/Resource": [ + "/lamsag-existingSageMakerEndpoint/'testKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "EncryptionKey1B843E66" + "data": "testKey2C00E5E5" } ], "/lamsag-existingSageMakerEndpoint/SagemakerEndpointConfig": [ { "type": "aws:cdk:logicalId", - "data": "SagemakerEndpointConfig" + "data": "SagemakerEndpointConfig", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] } ], "/lamsag-existingSageMakerEndpoint/SagemakerEndpoint": [ @@ -153,6 +156,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EncryptionKey1B843E66": [ + { + "type": "aws:cdk:logicalId", + "data": "EncryptionKey1B843E66", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "lamsag-existingSageMakerEndpoint" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/tree.json index 12a55bc19..2a7d33f6e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.js.snapshot/tree.json @@ -13,7 +13,7 @@ "path": "lamsag-existingSageMakerEndpoint/mappings", "constructInfo": { "fqn": "aws-cdk-lib.CfnMapping", - "version": "2.118.0" + "version": "2.135.0" } }, "SampleAsset": { @@ -25,7 +25,7 @@ "path": "lamsag-existingSageMakerEndpoint/SampleAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.135.0" } }, "AssetBucket": { @@ -33,13 +33,13 @@ "path": "lamsag-existingSageMakerEndpoint/SampleAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.135.0" } }, "SagemakerRole": { @@ -51,7 +51,7 @@ "path": "lamsag-existingSageMakerEndpoint/SagemakerRole/ImportSagemakerRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -293,19 +293,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "SagemakerModel": { @@ -338,16 +338,16 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sagemaker.CfnModel", - "version": "2.118.0" + "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "lamsag-existingSageMakerEndpoint/EncryptionKey", + "'testKey'": { + "id": "'testKey'", + "path": "lamsag-existingSageMakerEndpoint/'testKey'", "children": { "Resource": { "id": "Resource", - "path": "lamsag-existingSageMakerEndpoint/EncryptionKey/Resource", + "path": "lamsag-existingSageMakerEndpoint/'testKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -384,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "SagemakerEndpointConfig": { @@ -400,7 +400,7 @@ "aws:cdk:cloudformation:type": "AWS::SageMaker::EndpointConfig", "aws:cdk:cloudformation:props": { "kmsKeyId": { - "Ref": "EncryptionKey1B843E66" + "Ref": "testKey2C00E5E5" }, "productionVariants": [ { @@ -420,7 +420,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sagemaker.CfnEndpointConfig", - "version": "2.118.0" + "version": "2.135.0" } }, "SagemakerEndpoint": { @@ -439,7 +439,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sagemaker.CfnEndpoint", - "version": "2.118.0" + "version": "2.135.0" } }, "test-lambda-sagemaker": { @@ -455,7 +455,7 @@ "path": "lamsag-existingSageMakerEndpoint/test-lambda-sagemaker/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -518,7 +518,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -561,19 +561,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "LambdaFunction": { @@ -589,7 +589,7 @@ "path": "lamsag-existingSageMakerEndpoint/test-lambda-sagemaker/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.135.0" } }, "AssetBucket": { @@ -597,13 +597,13 @@ "path": "lamsag-existingSageMakerEndpoint/test-lambda-sagemaker/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -645,19 +645,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sagemakerendpoint.LambdaToSagemakerEndpoint", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -673,7 +673,7 @@ "path": "lamsag-existingSageMakerEndpoint/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -685,7 +685,7 @@ "path": "lamsag-existingSageMakerEndpoint/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -693,25 +693,25 @@ "path": "lamsag-existingSageMakerEndpoint/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -719,7 +719,7 @@ "path": "lamsag-existingSageMakerEndpoint/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -727,13 +727,13 @@ "path": "lamsag-existingSageMakerEndpoint/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -741,13 +741,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.ts index 3bc487d49..0b1c2bcce 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/integ.lamsag-existingSageMakerEndpoint.ts @@ -27,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-sagemakeren const getSagemakerModelResponse = getSagemakerModel(stack); -const deploySagemakerEndpointResponse = defaults.deploySagemakerEndpoint(stack, { +const deploySagemakerEndpointResponse = defaults.deploySagemakerEndpoint(stack, 'test', { modelProps: { primaryContainer: { image: getSagemakerModelResponse.mapping.findInMap(Stack.of(stack).region, "containerArn"), diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/lambda-secretsmanager.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/lambda-secretsmanager.test.ts index ec7ff2c75..4c6fad89d 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/lambda-secretsmanager.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/lambda-secretsmanager.test.ts @@ -344,7 +344,7 @@ test('Test overriding secretProps to pass a customer provided CMK', () => { // Stack const stack = new Stack(); - const encryptionKey = defaults.buildEncryptionKey(stack, { + const encryptionKey = defaults.buildEncryptionKey(stack, 'test', { description: 'secret-key' }); @@ -383,7 +383,7 @@ test('Test overriding secretProps to pass a customer provided CMK', () => { GenerateSecretString: {}, KmsKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testKey2C00E5E5", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/lib/index.ts index 7996f9638..6bea860d9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/lib/index.ts @@ -139,7 +139,7 @@ export class LambdaToSns extends Construct { }); // Setup the SNS topic - const buildTopicResponse = defaults.buildTopic(this, { + const buildTopicResponse = defaults.buildTopic(this, id, { existingTopicObj: props.existingTopicObj, topicProps: props.topicProps, enableEncryptionWithCustomerManagedKey: props.enableEncryptionWithCustomerManagedKey, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/lambda-sns.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/lambda-sns.test.ts index f7ac58de7..ab840f7c6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/lambda-sns.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/lambda-sns.test.ts @@ -431,7 +431,7 @@ test('Topic is encrypted with provided encryptionKeyProps', () => { template.hasResourceProperties('AWS::SNS::Topic', { KmsMasterKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructtestconstructKey1FB48CCA', 'Arn' ] }, @@ -441,7 +441,7 @@ test('Topic is encrypted with provided encryptionKeyProps', () => { AliasName: 'alias/new-key-alias-from-props', TargetKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructtestconstructKey1FB48CCA', 'Arn' ] } @@ -506,7 +506,7 @@ test('Topic is encrypted with customer managed KMS Key when enable encryption fl template.hasResourceProperties('AWS::SNS::Topic', { KmsMasterKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructtestconstructKey1FB48CCA', 'Arn' ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.assets.json index 9b9d76e9c..2b24b4b7f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.assets.json @@ -14,7 +14,7 @@ } } }, - "32809a976867bad5005b318c13bff642ad7289b128f0c1d3b1a0f63e56974529": { + "9f15cd399d6f02627acbc8a7614442a9aae8dc8c3d422afbb7d29ae80c0a4cf0": { "source": { "path": "lamsqs-useCmk.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "32809a976867bad5005b318c13bff642ad7289b128f0c1d3b1a0f63e56974529.json", + "objectKey": "9f15cd399d6f02627acbc8a7614442a9aae8dc8c3d422afbb7d29ae80c0a4cf0.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-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.template.json index d5dd2911a..14f75dfa4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.template.json @@ -93,7 +93,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testlambdasqsEncryptionKeyDAAFCB9F", + "testlambdasqsqueueKey37A590CE", "Arn" ] } @@ -250,7 +250,7 @@ ] } }, - "testlambdasqsEncryptionKeyDAAFCB9F": { + "testlambdasqsqueueKey37A590CE": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -291,7 +291,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "testlambdasqsEncryptionKeyDAAFCB9F", + "testlambdasqsqueueKey37A590CE", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/manifest.json index f78963b29..788919271 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/32809a976867bad5005b318c13bff642ad7289b128f0c1d3b1a0f63e56974529.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9f15cd399d6f02627acbc8a7614442a9aae8dc8c3d422afbb7d29ae80c0a4cf0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -112,10 +112,10 @@ "data": "testlambdasqsdeadLetterQueuePolicy270F1626" } ], - "/lamsqs-useCmk/test-lambda-sqs/EncryptionKey/Resource": [ + "/lamsqs-useCmk/test-lambda-sqs/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "testlambdasqsEncryptionKeyDAAFCB9F" + "data": "testlambdasqsqueueKey37A590CE" } ], "/lamsqs-useCmk/test-lambda-sqs/queue": [ @@ -147,6 +147,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "testlambdasqsEncryptionKeyDAAFCB9F": [ + { + "type": "aws:cdk:logicalId", + "data": "testlambdasqsEncryptionKeyDAAFCB9F", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "lamsqs-useCmk" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/tree.json index ce0dc4baf..8c5a8d292 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamsqs-useCmk/test-lambda-sqs/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.135.0" } }, "DefaultPolicy": { @@ -131,7 +131,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "testlambdasqsEncryptionKeyDAAFCB9F", + "testlambdasqsqueueKey37A590CE", "Arn" ] } @@ -149,19 +149,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.135.0" } }, "LambdaFunction": { @@ -177,7 +177,7 @@ "path": "lamsqs-useCmk/test-lambda-sqs/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.135.0" } }, "AssetBucket": { @@ -185,13 +185,13 @@ "path": "lamsqs-useCmk/test-lambda-sqs/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.135.0" } }, "Resource": { @@ -229,13 +229,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.135.0" } }, "deadLetterQueue": { @@ -253,7 +253,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -336,28 +336,28 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "lamsqs-useCmk/test-lambda-sqs/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "lamsqs-useCmk/test-lambda-sqs/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "lamsqs-useCmk/test-lambda-sqs/EncryptionKey/Resource", + "path": "lamsqs-useCmk/test-lambda-sqs/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -394,13 +394,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "queue": { @@ -415,7 +415,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "testlambdasqsEncryptionKeyDAAFCB9F", + "testlambdasqsqueueKey37A590CE", "Arn" ] }, @@ -432,7 +432,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -515,25 +515,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs.LambdaToSqs", - "version": "2.50.0" + "version": "2.54.1" } }, "Integ": { @@ -549,7 +549,7 @@ "path": "lamsqs-useCmk/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -561,7 +561,7 @@ "path": "lamsqs-useCmk/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -569,25 +569,25 @@ "path": "lamsqs-useCmk/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -595,7 +595,7 @@ "path": "lamsqs-useCmk/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -603,13 +603,13 @@ "path": "lamsqs-useCmk/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -617,13 +617,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/lambda-sqs.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/lambda-sqs.test.ts index 2942a5d6b..4f5e4177a 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/lambda-sqs.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/lambda-sqs.test.ts @@ -342,7 +342,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { template.hasResourceProperties('AWS::SQS::Queue', { KmsMasterKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructqueueKey763CFED2', 'Arn' ] }, @@ -352,7 +352,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { AliasName: 'alias/new-key-alias-from-props', TargetKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructqueueKey763CFED2', 'Arn' ] } @@ -398,7 +398,7 @@ test('Queue is encrypted with customer managed KMS Key when enable encryption fl template.hasResourceProperties('AWS::SQS::Queue', { KmsMasterKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructqueueKey763CFED2', 'Arn' ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-s3-sns/lib/index.ts index 5c522a454..a9028c45a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/lib/index.ts @@ -151,7 +151,7 @@ export class S3ToSns extends Construct { } // Setup the topic - const buildTopicResponse = defaults.buildTopic(this, { + const buildTopicResponse = defaults.buildTopic(this, id, { existingTopicObj: props.existingTopicObj, existingTopicEncryptionKey: props.existingTopicEncryptionKey, topicProps: props.topicProps, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/manifest.json index d78f0e065..ca2a4a816 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/93ea0ee9e9630296a0342ec7c2317f5008162745a46818f454a71db14d978d6c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/944b4cffd7e94b787f623853f3fdacfaac7f61c694e2356785012757e7bf776d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -118,10 +118,10 @@ "data": "tests3snsS3BucketNotificationsFCF8E340" } ], - "/s3sns-customLoggingBucket/test-s3-sns/EncryptionKey/Resource": [ + "/s3sns-customLoggingBucket/test-s3-sns/'test-s3-snsKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "tests3snsEncryptionKey6C553584" + "data": "tests3snstests3snsKey1D741F34" } ], "/s3sns-customLoggingBucket/test-s3-sns/SnsTopic/Resource": [ @@ -177,6 +177,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "tests3snsEncryptionKey6C553584": [ + { + "type": "aws:cdk:logicalId", + "data": "tests3snsEncryptionKey6C553584", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sns-customLoggingBucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.assets.json index deb845546..4e303c6e4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.assets.json @@ -14,7 +14,7 @@ } } }, - "93ea0ee9e9630296a0342ec7c2317f5008162745a46818f454a71db14d978d6c": { + "944b4cffd7e94b787f623853f3fdacfaac7f61c694e2356785012757e7bf776d": { "source": { "path": "s3sns-customLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "93ea0ee9e9630296a0342ec7c2317f5008162745a46818f454a71db14d978d6c.json", + "objectKey": "944b4cffd7e94b787f623853f3fdacfaac7f61c694e2356785012757e7bf776d.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-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.template.json index aa2d1ed76..bba399951 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.template.json @@ -316,7 +316,7 @@ "tests3snsSnsTopicF02F6BD0" ] }, - "tests3snsEncryptionKey6C553584": { + "tests3snstests3snsKey1D741F34": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -368,7 +368,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/tree.json index c6023e1b0..37fe27357 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/tree.json @@ -372,13 +372,13 @@ "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sns-customLoggingBucket/test-s3-sns/EncryptionKey", + "'test-s3-snsKey'": { + "id": "'test-s3-snsKey'", + "path": "s3sns-customLoggingBucket/test-s3-sns/'test-s3-snsKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sns-customLoggingBucket/test-s3-sns/EncryptionKey/Resource", + "path": "s3sns-customLoggingBucket/test-s3-sns/'test-s3-snsKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -447,7 +447,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/manifest.json index 472734741..87ffd9cb9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/9ad88fd90e906ab12fba7c8e5631ca2412424014cb197f78c2264a78d17c3a28.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/52a84f9d1f039704a71e9b583f92226bb2b4c112edfc54c06d899d1d0aa2f58d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,10 +136,10 @@ "data": "scrapBucketNotifications065035E3" } ], - "/s3sns-existingS3Bucket/test-s3-sns/EncryptionKey/Resource": [ + "/s3sns-existingS3Bucket/test-s3-sns/'test-s3-snsKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "tests3snsEncryptionKey6C553584" + "data": "tests3snstests3snsKey1D741F34" } ], "/s3sns-existingS3Bucket/test-s3-sns/SnsTopic/Resource": [ @@ -183,6 +183,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "tests3snsEncryptionKey6C553584": [ + { + "type": "aws:cdk:logicalId", + "data": "tests3snsEncryptionKey6C553584", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sns-existingS3Bucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.assets.json index 6a66725ec..4f0b203dc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.assets.json @@ -14,7 +14,7 @@ } } }, - "9ad88fd90e906ab12fba7c8e5631ca2412424014cb197f78c2264a78d17c3a28": { + "52a84f9d1f039704a71e9b583f92226bb2b4c112edfc54c06d899d1d0aa2f58d": { "source": { "path": "s3sns-existingS3Bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9ad88fd90e906ab12fba7c8e5631ca2412424014cb197f78c2264a78d17c3a28.json", + "objectKey": "52a84f9d1f039704a71e9b583f92226bb2b4c112edfc54c06d899d1d0aa2f58d.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-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.template.json index ed60d50f5..cbb2de4bb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.template.json @@ -418,7 +418,7 @@ "tests3snsSnsTopicF02F6BD0" ] }, - "tests3snsEncryptionKey6C553584": { + "tests3snstests3snsKey1D741F34": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -470,7 +470,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/tree.json index adf42af02..902744c0f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/tree.json @@ -431,13 +431,13 @@ "id": "test-s3-sns", "path": "s3sns-existingS3Bucket/test-s3-sns", "children": { - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sns-existingS3Bucket/test-s3-sns/EncryptionKey", + "'test-s3-snsKey'": { + "id": "'test-s3-snsKey'", + "path": "s3sns-existingS3Bucket/test-s3-sns/'test-s3-snsKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sns-existingS3Bucket/test-s3-sns/EncryptionKey/Resource", + "path": "s3sns-existingS3Bucket/test-s3-sns/'test-s3-snsKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -506,7 +506,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/manifest.json index 588c0c987..0460cfa53 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/f5a464f8743650529ab752498ef5e5d669738eedb67c544de3626ef243cb24f0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/adb16d42aafa9bedbd276e52dd14d44ea1543bc1c03d690db1939d7fcca8e0b8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -82,10 +82,10 @@ "s3sns-existingSnsTopic.assets" ], "metadata": { - "/s3sns-existingSnsTopic/EncryptionKey/Resource": [ + "/s3sns-existingSnsTopic/'testKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "EncryptionKey1B843E66" + "data": "testKey2C00E5E5" } ], "/s3sns-existingSnsTopic/SnsTopic/Resource": [ @@ -183,6 +183,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EncryptionKey1B843E66": [ + { + "type": "aws:cdk:logicalId", + "data": "EncryptionKey1B843E66", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sns-existingSnsTopic" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.assets.json index ffa1df350..890ea942a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.assets.json @@ -14,7 +14,7 @@ } } }, - "f5a464f8743650529ab752498ef5e5d669738eedb67c544de3626ef243cb24f0": { + "adb16d42aafa9bedbd276e52dd14d44ea1543bc1c03d690db1939d7fcca8e0b8": { "source": { "path": "s3sns-existingSnsTopic.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f5a464f8743650529ab752498ef5e5d669738eedb67c544de3626ef243cb24f0.json", + "objectKey": "adb16d42aafa9bedbd276e52dd14d44ea1543bc1c03d690db1939d7fcca8e0b8.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-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.template.json index a202ad3d9..5ad61a7d8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.template.json @@ -1,6 +1,6 @@ { "Resources": { - "EncryptionKey1B843E66": { + "testKey2C00E5E5": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -52,7 +52,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testKey2C00E5E5", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/tree.json index 37f10cdd5..77a603e46 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/tree.json @@ -8,13 +8,13 @@ "id": "s3sns-existingSnsTopic", "path": "s3sns-existingSnsTopic", "children": { - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sns-existingSnsTopic/EncryptionKey", + "'testKey'": { + "id": "'testKey'", + "path": "s3sns-existingSnsTopic/'testKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sns-existingSnsTopic/EncryptionKey/Resource", + "path": "s3sns-existingSnsTopic/'testKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -83,7 +83,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testKey2C00E5E5", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.ts b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.ts index b98f60e5e..0ea36879a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.ts +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.ts @@ -21,8 +21,8 @@ import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); -const existingTopicEncryptionKey = defaults.buildEncryptionKey(stack, {}); -const buildTopicResponse = defaults.buildTopic(stack, { +const existingTopicEncryptionKey = defaults.buildEncryptionKey(stack, 'test', {}); +const buildTopicResponse = defaults.buildTopic(stack, 'test', { encryptionKey: existingTopicEncryptionKey }); diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/manifest.json index 76bf2968e..87b3f9e4f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/6f633008f8435509d521c088c6d0235bab2394d617e2c5086b604fb3def24820.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7be517f6dafbc09907a487548d47a37edc90275c9528176d77785fc210216042.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -124,10 +124,10 @@ "data": "tests3snsS3BucketNotificationsFCF8E340" } ], - "/s3sns-newTopicFromProps/test-s3-sns/EncryptionKey/Resource": [ + "/s3sns-newTopicFromProps/test-s3-sns/'test-s3-snsKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "tests3snsEncryptionKey6C553584" + "data": "tests3snstests3snsKey1D741F34" } ], "/s3sns-newTopicFromProps/test-s3-sns/SnsTopic/Resource": [ @@ -183,6 +183,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "tests3snsEncryptionKey6C553584": [ + { + "type": "aws:cdk:logicalId", + "data": "tests3snsEncryptionKey6C553584", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sns-newTopicFromProps" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.assets.json index 0813d347b..85b4f2fec 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.assets.json @@ -14,7 +14,7 @@ } } }, - "6f633008f8435509d521c088c6d0235bab2394d617e2c5086b604fb3def24820": { + "7be517f6dafbc09907a487548d47a37edc90275c9528176d77785fc210216042": { "source": { "path": "s3sns-newTopicFromProps.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6f633008f8435509d521c088c6d0235bab2394d617e2c5086b604fb3def24820.json", + "objectKey": "7be517f6dafbc09907a487548d47a37edc90275c9528176d77785fc210216042.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-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.template.json index 9c2ff793b..9212662d8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.template.json @@ -367,7 +367,7 @@ "tests3snsSnsTopicF02F6BD0" ] }, - "tests3snsEncryptionKey6C553584": { + "tests3snstests3snsKey1D741F34": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -419,7 +419,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/tree.json index bc3e69168..fd95ad835 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/tree.json @@ -422,13 +422,13 @@ "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sns-newTopicFromProps/test-s3-sns/EncryptionKey", + "'test-s3-snsKey'": { + "id": "'test-s3-snsKey'", + "path": "s3sns-newTopicFromProps/test-s3-sns/'test-s3-snsKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sns-newTopicFromProps/test-s3-sns/EncryptionKey/Resource", + "path": "s3sns-newTopicFromProps/test-s3-sns/'test-s3-snsKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -497,7 +497,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/manifest.json index ceea76772..a7e227f74 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/654df2e118ea7a575edeed6c2e8520825fdef6ac00732ca2390b934bab5a90c8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3db227a55f1b2c41ba932ec6884656e68479bd92e565b6d36b854de3efd43bb8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -124,10 +124,10 @@ "data": "tests3snsS3BucketNotificationsFCF8E340" } ], - "/s3sns-noArguments/test-s3-sns/EncryptionKey/Resource": [ + "/s3sns-noArguments/test-s3-sns/'test-s3-snsKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "tests3snsEncryptionKey6C553584" + "data": "tests3snstests3snsKey1D741F34" } ], "/s3sns-noArguments/test-s3-sns/SnsTopic/Resource": [ @@ -183,6 +183,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "tests3snsEncryptionKey6C553584": [ + { + "type": "aws:cdk:logicalId", + "data": "tests3snsEncryptionKey6C553584", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sns-noArguments" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.assets.json index 6f5dc4062..436981b89 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.assets.json @@ -14,7 +14,7 @@ } } }, - "654df2e118ea7a575edeed6c2e8520825fdef6ac00732ca2390b934bab5a90c8": { + "3db227a55f1b2c41ba932ec6884656e68479bd92e565b6d36b854de3efd43bb8": { "source": { "path": "s3sns-noArguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "654df2e118ea7a575edeed6c2e8520825fdef6ac00732ca2390b934bab5a90c8.json", + "objectKey": "3db227a55f1b2c41ba932ec6884656e68479bd92e565b6d36b854de3efd43bb8.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-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.template.json index e64514a7a..dee9fc02f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.template.json @@ -367,7 +367,7 @@ "tests3snsSnsTopicF02F6BD0" ] }, - "tests3snsEncryptionKey6C553584": { + "tests3snstests3snsKey1D741F34": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -419,7 +419,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/tree.json index 463cef011..5119929f0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/tree.json @@ -422,13 +422,13 @@ "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sns-noArguments/test-s3-sns/EncryptionKey", + "'test-s3-snsKey'": { + "id": "'test-s3-snsKey'", + "path": "s3sns-noArguments/test-s3-sns/'test-s3-snsKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sns-noArguments/test-s3-sns/EncryptionKey/Resource", + "path": "s3sns-noArguments/test-s3-sns/'test-s3-snsKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -497,7 +497,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/manifest.json index 87dd45c65..d3ae4d027 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/6072ad2aa5aa15fc49fb7ffe7444bee04cf91ca14a27a46ce6cababdd839a1f7.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f1af5c48fe8513b952ac452e3275c1c0373b0efdebbace57a242af454fb2937f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -124,10 +124,10 @@ "data": "tests3snsS3BucketNotificationsFCF8E340" } ], - "/s3sns-s3EventTypesAndFilters/test-s3-sns/EncryptionKey/Resource": [ + "/s3sns-s3EventTypesAndFilters/test-s3-sns/'test-s3-snsKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "tests3snsEncryptionKey6C553584" + "data": "tests3snstests3snsKey1D741F34" } ], "/s3sns-s3EventTypesAndFilters/test-s3-sns/SnsTopic/Resource": [ @@ -183,6 +183,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "tests3snsEncryptionKey6C553584": [ + { + "type": "aws:cdk:logicalId", + "data": "tests3snsEncryptionKey6C553584", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sns-s3EventTypesAndFilters" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.assets.json index e4e714f07..2090f4320 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.assets.json @@ -14,7 +14,7 @@ } } }, - "6072ad2aa5aa15fc49fb7ffe7444bee04cf91ca14a27a46ce6cababdd839a1f7": { + "f1af5c48fe8513b952ac452e3275c1c0373b0efdebbace57a242af454fb2937f": { "source": { "path": "s3sns-s3EventTypesAndFilters.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6072ad2aa5aa15fc49fb7ffe7444bee04cf91ca14a27a46ce6cababdd839a1f7.json", + "objectKey": "f1af5c48fe8513b952ac452e3275c1c0373b0efdebbace57a242af454fb2937f.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-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.template.json index 124fe57a6..11df0fad9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.template.json @@ -381,7 +381,7 @@ "tests3snsSnsTopicF02F6BD0" ] }, - "tests3snsEncryptionKey6C553584": { + "tests3snstests3snsKey1D741F34": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -433,7 +433,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/tree.json index 43be318dc..4eb227310 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/tree.json @@ -422,13 +422,13 @@ "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sns-s3EventTypesAndFilters/test-s3-sns/EncryptionKey", + "'test-s3-snsKey'": { + "id": "'test-s3-snsKey'", + "path": "s3sns-s3EventTypesAndFilters/test-s3-sns/'test-s3-snsKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sns-s3EventTypesAndFilters/test-s3-sns/EncryptionKey/Resource", + "path": "s3sns-s3EventTypesAndFilters/test-s3-sns/'test-s3-snsKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -497,7 +497,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/test.s3-sns.test.ts b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/test.s3-sns.test.ts index 13acbc083..f784406ba 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/test.s3-sns.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/test.s3-sns.test.ts @@ -70,10 +70,10 @@ test('construct uses existingBucketObj property', () => { test('construct uses existing topic and key', () => { const stack = new Stack(); - const cmk = defaults.buildEncryptionKey(stack, { + const cmk = defaults.buildEncryptionKey(stack, 'test', { description: 'existing-key-description' }); - const buildTopicResponse = defaults.buildTopic(stack, { + const buildTopicResponse = defaults.buildTopic(stack, 'test', { encryptionKey: cmk, topicProps: { topicName: 'existing-topic-name' @@ -146,7 +146,7 @@ test('construct uses specific event types and filters', () => { test('Topic is encrypted with imported CMK when set on encryptionKey prop', () => { const stack = new Stack(); - const cmk = defaults.buildEncryptionKey(stack, { + const cmk = defaults.buildEncryptionKey(stack, 'test', { description: 'existing-key-description' }); new S3ToSns(stack, 'test-s3-sns', { @@ -169,7 +169,7 @@ test('Topic is encrypted with provided encryptionKeyProps', () => { test('Topic is encrypted with imported CMK when set on topicProps.masterKey prop', () => { const stack = new Stack(); - const cmk = defaults.buildEncryptionKey(stack, { + const cmk = defaults.buildEncryptionKey(stack, 'test', { description: 'existing-key-description' }); new S3ToSns(stack, 'test-s3-sns', { @@ -190,7 +190,7 @@ test('Topic is encrypted by default with Customer-managed KMS key when no other template.hasResourceProperties("AWS::SNS::Topic", { KmsMasterKeyId: { "Fn::GetAtt": [ - "tests3snsEncryptionKey6C553584", + "tests3snstests3snsKey1D741F34", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/manifest.json index 822de1eae..d7b3ad97b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/20455894d2574698b2461803d49e2663bee63a6f4ac60077df7be3f8c8793998.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7d888bac322f924857fb4e80afa5709905cc63d852053d6dc951c62240afd920.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -130,10 +130,10 @@ "data": "tests3sqsdeadLetterQueuePolicy35D7CFE3" } ], - "/s3sqs-customLoggingBucket/test-s3-sqs/EncryptionKey/Resource": [ + "/s3sqs-customLoggingBucket/test-s3-sqs/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "tests3sqsEncryptionKeyFD4D5946" + "data": "tests3sqsqueueKey27AABDC5" } ], "/s3sqs-customLoggingBucket/test-s3-sqs/queue": [ @@ -195,6 +195,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "tests3sqsEncryptionKeyFD4D5946": [ + { + "type": "aws:cdk:logicalId", + "data": "tests3sqsEncryptionKeyFD4D5946", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sqs-customLoggingBucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.assets.json index 41bf12a9e..da0664aa3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.assets.json @@ -14,7 +14,7 @@ } } }, - "20455894d2574698b2461803d49e2663bee63a6f4ac60077df7be3f8c8793998": { + "7d888bac322f924857fb4e80afa5709905cc63d852053d6dc951c62240afd920": { "source": { "path": "s3sqs-customLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "20455894d2574698b2461803d49e2663bee63a6f4ac60077df7be3f8c8793998.json", + "objectKey": "7d888bac322f924857fb4e80afa5709905cc63d852053d6dc951c62240afd920.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-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.template.json index afa2ede69..b796a33a3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.template.json @@ -398,7 +398,7 @@ ] } }, - "tests3sqsEncryptionKeyFD4D5946": { + "tests3sqsqueueKey27AABDC5": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -473,7 +473,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "tests3sqsEncryptionKeyFD4D5946", + "tests3sqsqueueKey27AABDC5", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/tree.json index b59043112..ea68b3b43 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/tree.json @@ -485,13 +485,13 @@ "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sqs-customLoggingBucket/test-s3-sqs/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "s3sqs-customLoggingBucket/test-s3-sqs/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sqs-customLoggingBucket/test-s3-sqs/EncryptionKey/Resource", + "path": "s3sqs-customLoggingBucket/test-s3-sqs/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -583,7 +583,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "tests3sqsEncryptionKeyFD4D5946", + "tests3sqsqueueKey27AABDC5", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/manifest.json index 98b5a3c84..57b46f620 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/ccd43bdc423afa78f46a2b4be6f2495f3b9f8afc7565ade04c3404e5554fa9aa.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d0ab375d516b11abd4d39332af9bcf42faf443fcbb20fcfdc37972c120910686.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -166,10 +166,10 @@ "data": "tests3sqstempdeadLetterQueuePolicy56962C75" } ], - "/s3sqs-existingLoggingBucket/test-s3-sqs-temp/EncryptionKey/Resource": [ + "/s3sqs-existingLoggingBucket/test-s3-sqs-temp/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "tests3sqstempEncryptionKey57CC85E2" + "data": "tests3sqstempqueueKeyC7A07658" } ], "/s3sqs-existingLoggingBucket/test-s3-sqs-temp/queue": [ @@ -219,6 +219,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "tests3sqstempEncryptionKey57CC85E2": [ + { + "type": "aws:cdk:logicalId", + "data": "tests3sqstempEncryptionKey57CC85E2", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sqs-existingLoggingBucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.assets.json index 720e31b47..3f8826517 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.assets.json @@ -14,7 +14,7 @@ } } }, - "ccd43bdc423afa78f46a2b4be6f2495f3b9f8afc7565ade04c3404e5554fa9aa": { + "d0ab375d516b11abd4d39332af9bcf42faf443fcbb20fcfdc37972c120910686": { "source": { "path": "s3sqs-existingLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ccd43bdc423afa78f46a2b4be6f2495f3b9f8afc7565ade04c3404e5554fa9aa.json", + "objectKey": "d0ab375d516b11abd4d39332af9bcf42faf443fcbb20fcfdc37972c120910686.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-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.template.json index ca2ea598c..9ec737c3e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.template.json @@ -690,7 +690,7 @@ ] } }, - "tests3sqstempEncryptionKey57CC85E2": { + "tests3sqstempqueueKeyC7A07658": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -765,7 +765,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "tests3sqstempEncryptionKey57CC85E2", + "tests3sqstempqueueKeyC7A07658", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/tree.json index 7a75e7db3..96edc7bb3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/tree.json @@ -767,13 +767,13 @@ "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sqs-existingLoggingBucket/test-s3-sqs-temp/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "s3sqs-existingLoggingBucket/test-s3-sqs-temp/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sqs-existingLoggingBucket/test-s3-sqs-temp/EncryptionKey/Resource", + "path": "s3sqs-existingLoggingBucket/test-s3-sqs-temp/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -865,7 +865,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "tests3sqstempEncryptionKey57CC85E2", + "tests3sqstempqueueKeyC7A07658", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/manifest.json index 47059fdb4..37afca3b7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/01dcf9262dcf8a3931b745bc6e6a7889dd5c6f98c8ad2103bc956e6a318efa5a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/977cf203af958342dc41de734e4cde07e4b9618954034c7a76ea0cf81b6950c3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -82,10 +82,10 @@ "s3sqs-existingQueue.assets" ], "metadata": { - "/s3sqs-existingQueue/EncryptionKey/Resource": [ + "/s3sqs-existingQueue/'test-existing-queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "EncryptionKey1B843E66" + "data": "testexistingqueueKey84D97AF0" } ], "/s3sqs-existingQueue/test-existing-queue": [ @@ -171,6 +171,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EncryptionKey1B843E66": [ + { + "type": "aws:cdk:logicalId", + "data": "EncryptionKey1B843E66", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sqs-existingQueue" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.assets.json index 38f189192..6401456ac 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.assets.json @@ -14,7 +14,7 @@ } } }, - "01dcf9262dcf8a3931b745bc6e6a7889dd5c6f98c8ad2103bc956e6a318efa5a": { + "977cf203af958342dc41de734e4cde07e4b9618954034c7a76ea0cf81b6950c3": { "source": { "path": "s3sqs-existingQueue.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "01dcf9262dcf8a3931b745bc6e6a7889dd5c6f98c8ad2103bc956e6a318efa5a.json", + "objectKey": "977cf203af958342dc41de734e4cde07e4b9618954034c7a76ea0cf81b6950c3.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-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.template.json index de3f5f9a5..3cfe6cc3d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.template.json @@ -1,6 +1,6 @@ { "Resources": { - "EncryptionKey1B843E66": { + "testexistingqueueKey84D97AF0": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -75,7 +75,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testexistingqueueKey84D97AF0", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/tree.json index ac5d514ff..2c314f3dc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/tree.json @@ -8,13 +8,13 @@ "id": "s3sqs-existingQueue", "path": "s3sqs-existingQueue", "children": { - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sqs-existingQueue/EncryptionKey", + "'test-existing-queueKey'": { + "id": "'test-existing-queueKey'", + "path": "s3sqs-existingQueue/'test-existing-queueKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sqs-existingQueue/EncryptionKey/Resource", + "path": "s3sqs-existingQueue/'test-existing-queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -106,7 +106,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testexistingqueueKey84D97AF0", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/manifest.json index b09d0123d..1358c61a8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/3160ae85fa8e15620ea168ee5ea8d510bb65233aab6d5ddf1e27e1b4a5651eb4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f51c7d39b813692bf74ac7f2c310c7e4baec747909cdf92de9b0a3a350fd0b8b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,10 +148,10 @@ "data": "tests3sqsdeadLetterQueuePolicy35D7CFE3" } ], - "/s3sqs-existingS3Bucket/test-s3-sqs/EncryptionKey/Resource": [ + "/s3sqs-existingS3Bucket/test-s3-sqs/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "tests3sqsEncryptionKeyFD4D5946" + "data": "tests3sqsqueueKey27AABDC5" } ], "/s3sqs-existingS3Bucket/test-s3-sqs/queue": [ @@ -201,6 +201,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "tests3sqsEncryptionKeyFD4D5946": [ + { + "type": "aws:cdk:logicalId", + "data": "tests3sqsEncryptionKeyFD4D5946", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sqs-existingS3Bucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.assets.json index f68eda80c..3c4eaf732 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.assets.json @@ -14,7 +14,7 @@ } } }, - "3160ae85fa8e15620ea168ee5ea8d510bb65233aab6d5ddf1e27e1b4a5651eb4": { + "f51c7d39b813692bf74ac7f2c310c7e4baec747909cdf92de9b0a3a350fd0b8b": { "source": { "path": "s3sqs-existingS3Bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3160ae85fa8e15620ea168ee5ea8d510bb65233aab6d5ddf1e27e1b4a5651eb4.json", + "objectKey": "f51c7d39b813692bf74ac7f2c310c7e4baec747909cdf92de9b0a3a350fd0b8b.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-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.template.json index 5deb5e216..676274d08 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.template.json @@ -500,7 +500,7 @@ ] } }, - "tests3sqsEncryptionKeyFD4D5946": { + "tests3sqsqueueKey27AABDC5": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -575,7 +575,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "tests3sqsEncryptionKeyFD4D5946", + "tests3sqsqueueKey27AABDC5", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/tree.json index b1cc769f5..49e073758 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/tree.json @@ -544,13 +544,13 @@ "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sqs-existingS3Bucket/test-s3-sqs/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "s3sqs-existingS3Bucket/test-s3-sqs/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sqs-existingS3Bucket/test-s3-sqs/EncryptionKey/Resource", + "path": "s3sqs-existingS3Bucket/test-s3-sqs/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -642,7 +642,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "tests3sqsEncryptionKeyFD4D5946", + "tests3sqsqueueKey27AABDC5", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/manifest.json index d7863bfbf..6e488b1ff 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/11733c2feb8cf4ccd4bf8edc29ef04035e1fb2d45dce74cd665db478d0d5916f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f0717d020b24e22963d03931df9cd9bec2d76174de1c0dbc13f4d5730eef8f6a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,10 +136,10 @@ "data": "tests3sqsdeadLetterQueuePolicy35D7CFE3" } ], - "/s3sqs-noArguments/test-s3-sqs/EncryptionKey/Resource": [ + "/s3sqs-noArguments/test-s3-sqs/'queueKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "tests3sqsEncryptionKeyFD4D5946" + "data": "tests3sqsqueueKey27AABDC5" } ], "/s3sqs-noArguments/test-s3-sqs/queue": [ @@ -201,6 +201,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "tests3sqsEncryptionKeyFD4D5946": [ + { + "type": "aws:cdk:logicalId", + "data": "tests3sqsEncryptionKeyFD4D5946", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "s3sqs-noArguments" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.assets.json index 96f18f946..28fbff085 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.assets.json @@ -14,7 +14,7 @@ } } }, - "11733c2feb8cf4ccd4bf8edc29ef04035e1fb2d45dce74cd665db478d0d5916f": { + "f0717d020b24e22963d03931df9cd9bec2d76174de1c0dbc13f4d5730eef8f6a": { "source": { "path": "s3sqs-noArguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "11733c2feb8cf4ccd4bf8edc29ef04035e1fb2d45dce74cd665db478d0d5916f.json", + "objectKey": "f0717d020b24e22963d03931df9cd9bec2d76174de1c0dbc13f4d5730eef8f6a.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-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.template.json index 4082957aa..60d2da323 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.template.json @@ -449,7 +449,7 @@ ] } }, - "tests3sqsEncryptionKeyFD4D5946": { + "tests3sqsqueueKey27AABDC5": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, @@ -524,7 +524,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "tests3sqsEncryptionKeyFD4D5946", + "tests3sqsqueueKey27AABDC5", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/tree.json index 3c11bdfc0..a2fe00845 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/tree.json @@ -535,13 +535,13 @@ "version": "2.135.0" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "s3sqs-noArguments/test-s3-sqs/EncryptionKey", + "'queueKey'": { + "id": "'queueKey'", + "path": "s3sqs-noArguments/test-s3-sqs/'queueKey'", "children": { "Resource": { "id": "Resource", - "path": "s3sqs-noArguments/test-s3-sqs/EncryptionKey/Resource", + "path": "s3sqs-noArguments/test-s3-sqs/'queueKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -633,7 +633,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "tests3sqsEncryptionKeyFD4D5946", + "tests3sqsqueueKey27AABDC5", "Arn" ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/test.s3-sqs.test.ts b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/test.s3-sqs.test.ts index 3536ea314..ace51a33d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/test.s3-sqs.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/test.s3-sqs.test.ts @@ -188,7 +188,7 @@ test('Test deployment w/ SSE encryption enabled using customer managed KMS CMK', template.hasResourceProperties("AWS::SQS::Queue", { KmsMasterKeyId: { "Fn::GetAtt": [ - "tests3sqsEncryptionKeyFD4D5946", + "tests3sqsqueueKey27AABDC5", "Arn" ] } @@ -292,7 +292,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { template.hasResourceProperties("AWS::SQS::Queue", { KmsMasterKeyId: { "Fn::GetAtt": [ - "tests3sqsEncryptionKeyFD4D5946", + "tests3sqsqueueKey27AABDC5", "Arn" ] } @@ -302,7 +302,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { AliasName: 'alias/new-key-alias-from-props', TargetKeyId: { "Fn::GetAtt": [ - "tests3sqsEncryptionKeyFD4D5946", + "tests3sqsqueueKey27AABDC5", "Arn" ] } @@ -338,7 +338,7 @@ test('Queue is encrypted by default with Customer-managed KMS key when no other template.hasResourceProperties("AWS::SQS::Queue", { KmsMasterKeyId: { "Fn::GetAtt": [ - "tests3sqsEncryptionKeyFD4D5946", + "tests3sqsqueueKey27AABDC5", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/lib/index.ts index f419afeed..48e8d4242 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/lib/index.ts @@ -95,7 +95,7 @@ export class SnsToLambda extends Construct { }); // Setup the SNS topic - const buildTopicResponse = defaults.buildTopic(this, { + const buildTopicResponse = defaults.buildTopic(this, id, { existingTopicObj: props.existingTopicObj, topicProps: props.topicProps, enableEncryptionWithCustomerManagedKey: props.enableEncryptionWithCustomerManagedKey, diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/sns-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/sns-lambda.test.ts index ee8ba5c7c..4a27165ec 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/sns-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/sns-lambda.test.ts @@ -157,7 +157,7 @@ test('Topic is encrypted with provided encryptionKeyProps', () => { template.hasResourceProperties('AWS::SNS::Topic', { KmsMasterKeyId: { 'Fn::GetAtt': [ - 'testsnslambdaEncryptionKeyDDDF040B', + 'testsnslambdatestsnslambdaKeyA92BF361', 'Arn' ] }, @@ -167,7 +167,7 @@ test('Topic is encrypted with provided encryptionKeyProps', () => { AliasName: 'alias/new-key-alias-from-props', TargetKeyId: { 'Fn::GetAtt': [ - 'testsnslambdaEncryptionKeyDDDF040B', + 'testsnslambdatestsnslambdaKeyA92BF361', 'Arn' ] } @@ -230,7 +230,7 @@ test('Topic is encrypted with customer managed KMS Key when enable encryption fl template.hasResourceProperties('AWS::SNS::Topic', { KmsMasterKeyId: { 'Fn::GetAtt': [ - 'testsnslambdaEncryptionKeyDDDF040B', + 'testsnslambdatestsnslambdaKeyA92BF361', 'Arn' ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/lib/index.ts index 155ae4bf7..a66f45b89 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/lib/index.ts @@ -134,13 +134,13 @@ export class SnsToSqs extends Construct { enableEncryptionParam = true; // Create the encryptionKey if none was provided if (!props.encryptionKey) { - encryptionKeyParam = buildEncryptionKey(scope, props.encryptionKeyProps); + encryptionKeyParam = buildEncryptionKey(scope, id, props.encryptionKeyProps); } } // Setup the SNS topic if (!props.existingTopicObj) { // If an existingTopicObj was not specified create new topic - const buildTopicResponse = defaults.buildTopic(this, { + const buildTopicResponse = defaults.buildTopic(this, id, { topicProps: props.topicProps, enableEncryptionWithCustomerManagedKey: enableEncryptionParam, encryptionKey: encryptionKeyParam diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/manifest.json index 9d26ec6cd..59231391b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/d20dbaa3ddb6772aad8fba215cb3d8b5e17cd8a9bed3a3c449d7661c94ce4a5f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/55e20ba83a81e14e2d30928a2e02a4e217211737f47ee041ec635a72b650e17f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -130,10 +130,10 @@ "data": "testsnssqsstackqueuesnssqsnoargumentstestsnssqsstackSnsTopic716318502B9FD0D3" } ], - "/snssqs-no-arguments/EncryptionKey/Resource": [ + "/snssqs-no-arguments/'test-sns-sqs-stackKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "EncryptionKey1B843E66" + "data": "testsnssqsstackKeyCECC9471" } ], "/snssqs-no-arguments/BootstrapVersion": [ @@ -147,6 +147,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EncryptionKey1B843E66": [ + { + "type": "aws:cdk:logicalId", + "data": "EncryptionKey1B843E66", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "snssqs-no-arguments" diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/snssqs-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/snssqs-no-arguments.assets.json index e71c6ce59..59f58d243 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/snssqs-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/snssqs-no-arguments.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "d20dbaa3ddb6772aad8fba215cb3d8b5e17cd8a9bed3a3c449d7661c94ce4a5f": { + "55e20ba83a81e14e2d30928a2e02a4e217211737f47ee041ec635a72b650e17f": { "source": { "path": "snssqs-no-arguments.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d20dbaa3ddb6772aad8fba215cb3d8b5e17cd8a9bed3a3c449d7661c94ce4a5f.json", + "objectKey": "55e20ba83a81e14e2d30928a2e02a4e217211737f47ee041ec635a72b650e17f.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-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/snssqs-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/snssqs-no-arguments.template.json index 18ba88521..f58114383 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/snssqs-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/snssqs-no-arguments.template.json @@ -85,7 +85,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsstackKeyCECC9471", "Arn" ] } @@ -180,7 +180,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsstackKeyCECC9471", "Arn" ] }, @@ -306,7 +306,7 @@ "testsnssqsstackqueuePolicyFD3F4725" ] }, - "EncryptionKey1B843E66": { + "testsnssqsstackKeyCECC9471": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/tree.json index a2ff993b7..2b93b7fb6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-no-arguments.js.snapshot/tree.json @@ -27,7 +27,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -110,19 +110,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, "SnsTopic": { @@ -137,7 +137,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsstackKeyCECC9471", "Arn" ] } @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -241,19 +241,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.118.0" + "version": "2.135.0" } }, "queue": { @@ -268,7 +268,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsstackKeyCECC9471", "Arn" ] }, @@ -285,7 +285,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -388,13 +388,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } }, "snssqsnoargumentstestsnssqsstackSnsTopic71631850": { @@ -421,34 +421,34 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Subscription", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sns-sqs.SnsToSqs", - "version": "2.50.0" + "version": "2.54.1" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "snssqs-no-arguments/EncryptionKey", + "'test-sns-sqs-stackKey'": { + "id": "'test-sns-sqs-stackKey'", + "path": "snssqs-no-arguments/'test-sns-sqs-stackKey'", "children": { "Resource": { "id": "Resource", - "path": "snssqs-no-arguments/EncryptionKey/Resource", + "path": "snssqs-no-arguments/'test-sns-sqs-stackKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -523,13 +523,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "Integ": { @@ -545,7 +545,7 @@ "path": "snssqs-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -557,7 +557,7 @@ "path": "snssqs-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -565,25 +565,25 @@ "path": "snssqs-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -591,7 +591,7 @@ "path": "snssqs-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -599,13 +599,13 @@ "path": "snssqs-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -613,13 +613,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/manifest.json index e6c3f138d..ec82f9eef 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "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}/eb9f72639c274ae2e85626afd2172315d096681c914f6a57d5a192e07a2fa009.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5c8ca01207d193c2396db5103fa5311586a144b9d42960137a0f44921d1f19bf.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,10 +148,10 @@ "data": "testsnssqsstackqueuesnssqsrawMessageDeliverytestsnssqsstackSnsTopic3172B66321A5F373" } ], - "/snssqs-rawMessageDelivery/EncryptionKey/Resource": [ + "/snssqs-rawMessageDelivery/'test-sns-sqs-stackKey'/Resource": [ { "type": "aws:cdk:logicalId", - "data": "EncryptionKey1B843E66" + "data": "testsnssqsstackKeyCECC9471" } ], "/snssqs-rawMessageDelivery/BootstrapVersion": [ @@ -165,6 +165,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EncryptionKey1B843E66": [ + { + "type": "aws:cdk:logicalId", + "data": "EncryptionKey1B843E66", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "snssqs-rawMessageDelivery" diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/snssqs-rawMessageDelivery.assets.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/snssqs-rawMessageDelivery.assets.json index fb26de4a9..6505b22f9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/snssqs-rawMessageDelivery.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/snssqs-rawMessageDelivery.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "eb9f72639c274ae2e85626afd2172315d096681c914f6a57d5a192e07a2fa009": { + "5c8ca01207d193c2396db5103fa5311586a144b9d42960137a0f44921d1f19bf": { "source": { "path": "snssqs-rawMessageDelivery.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "eb9f72639c274ae2e85626afd2172315d096681c914f6a57d5a192e07a2fa009.json", + "objectKey": "5c8ca01207d193c2396db5103fa5311586a144b9d42960137a0f44921d1f19bf.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-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/snssqs-rawMessageDelivery.template.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/snssqs-rawMessageDelivery.template.json index 51c057e48..e64a6babb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/snssqs-rawMessageDelivery.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/snssqs-rawMessageDelivery.template.json @@ -169,7 +169,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsstackKeyCECC9471", "Arn" ] } @@ -264,7 +264,7 @@ "Properties": { "KmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsstackKeyCECC9471", "Arn" ] }, @@ -437,7 +437,7 @@ "testsnssqsstackqueuePolicyFD3F4725" ] }, - "EncryptionKey1B843E66": { + "testsnssqsstackKeyCECC9471": { "Type": "AWS::KMS::Key", "Properties": { "EnableKeyRotation": true, diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/tree.json index bbaba9bcb..ae9412573 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-rawMessageDelivery.js.snapshot/tree.json @@ -51,13 +51,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "existing-dlq-obj": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -127,19 +127,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, "test-sns-sqs-stack": { @@ -161,7 +161,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -244,19 +244,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } }, "SnsTopic": { @@ -271,7 +271,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsstackKeyCECC9471", "Arn" ] } @@ -279,7 +279,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -375,19 +375,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.118.0" + "version": "2.135.0" } }, "queue": { @@ -402,7 +402,7 @@ "aws:cdk:cloudformation:props": { "kmsMasterKeyId": { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsstackKeyCECC9471", "Arn" ] }, @@ -419,7 +419,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.135.0" } }, "Policy": { @@ -522,13 +522,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.135.0" } }, "snssqsrawMessageDeliverytestsnssqsstackSnsTopic3172B663": { @@ -602,34 +602,34 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Subscription", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sns-sqs.SnsToSqs", - "version": "2.50.0" + "version": "2.54.1" } }, - "EncryptionKey": { - "id": "EncryptionKey", - "path": "snssqs-rawMessageDelivery/EncryptionKey", + "'test-sns-sqs-stackKey'": { + "id": "'test-sns-sqs-stackKey'", + "path": "snssqs-rawMessageDelivery/'test-sns-sqs-stackKey'", "children": { "Resource": { "id": "Resource", - "path": "snssqs-rawMessageDelivery/EncryptionKey/Resource", + "path": "snssqs-rawMessageDelivery/'test-sns-sqs-stackKey'/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -704,13 +704,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.135.0" } }, "Integ": { @@ -726,7 +726,7 @@ "path": "snssqs-rawMessageDelivery/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -738,7 +738,7 @@ "path": "snssqs-rawMessageDelivery/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -746,25 +746,25 @@ "path": "snssqs-rawMessageDelivery/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.135.0-alpha.0" } }, "BootstrapVersion": { @@ -772,7 +772,7 @@ "path": "snssqs-rawMessageDelivery/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.135.0" } }, "CheckBootstrapVersion": { @@ -780,13 +780,13 @@ "path": "snssqs-rawMessageDelivery/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.135.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.135.0" } }, "Tree": { @@ -794,13 +794,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.135.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/sns-sqs.test.ts b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/sns-sqs.test.ts index 320fac669..537c8df93 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/sns-sqs.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/sns-sqs.test.ts @@ -32,7 +32,7 @@ test('Pattern deployment w/ new Topic, new Queue and default props', () => { template.hasResourceProperties("AWS::SNS::Topic", { KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsKey08A506C4", "Arn" ] } @@ -41,7 +41,7 @@ test('Pattern deployment w/ new Topic, new Queue and default props', () => { template.hasResourceProperties("AWS::SQS::Queue", { KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsKey08A506C4", "Arn" ] } @@ -86,7 +86,7 @@ test('Pattern deployment w/ new topic, new queue, and overridden props', () => { TopicName: "new-topic", KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testsnssqsKey08A506C4", "Arn" ] } diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/test.sqs-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/test.sqs-lambda.test.ts index 20f88fe91..d115d5efa 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/test.sqs-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/test.sqs-lambda.test.ts @@ -203,7 +203,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { template.hasResourceProperties('AWS::SQS::Queue', { KmsMasterKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructqueueKey763CFED2', 'Arn' ] }, @@ -213,7 +213,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { AliasName: 'alias/new-key-alias-from-props', TargetKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructqueueKey763CFED2', 'Arn' ] } @@ -259,7 +259,7 @@ test('Queue is encrypted with customer managed KMS Key when enable encryption fl template.hasResourceProperties('AWS::SQS::Queue', { KmsMasterKeyId: { 'Fn::GetAtt': [ - 'testconstructEncryptionKey6153B053', + 'testconstructqueueKey763CFED2', 'Arn' ] }, diff --git a/source/patterns/@aws-solutions-constructs/core/lib/kms-helper.ts b/source/patterns/@aws-solutions-constructs/core/lib/kms-helper.ts index 89409af5c..c65d6733d 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/kms-helper.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/kms-helper.ts @@ -25,7 +25,7 @@ import { Construct } from 'constructs'; /** * @internal This is an internal core function and should not be called directly by Solutions Constructs clients. */ -export function buildEncryptionKey(scope: Construct, keyProps?: kms.KeyProps): kms.Key { +export function buildEncryptionKey(scope: Construct, id: string, keyProps?: kms.KeyProps): kms.Key { // Setup the key properties let encryptionKeyProps; @@ -33,5 +33,5 @@ export function buildEncryptionKey(scope: Construct, keyProps?: kms.KeyProps): k encryptionKeyProps = consolidateProps(DefaultEncryptionProps, keyProps); // Create the encryption key and return - return new kms.Key(scope, 'EncryptionKey', encryptionKeyProps); + return new kms.Key(scope, `'${id}Key'`, encryptionKeyProps); } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/core/lib/sagemaker-helper.ts b/source/patterns/@aws-solutions-constructs/core/lib/sagemaker-helper.ts index 24e3b84d4..0603583c4 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/sagemaker-helper.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/sagemaker-helper.ts @@ -230,6 +230,7 @@ export interface BuildSagemakerNotebookResponse { */ export function buildSagemakerNotebook( scope: Construct, + id: string, props: BuildSagemakerNotebookProps ): BuildSagemakerNotebookResponse { // Setup the notebook properties @@ -251,7 +252,7 @@ export function buildSagemakerNotebook( addPermissions(props.role); if (props.sagemakerNotebookProps?.kmsKeyId === undefined) { - kmsKeyId = buildEncryptionKey(scope).keyId; + kmsKeyId = buildEncryptionKey(scope, id).keyId; } else { kmsKeyId = props.sagemakerNotebookProps.kmsKeyId; } @@ -367,12 +368,13 @@ export interface BuildSagemakerEndpointResponse { */ export function BuildSagemakerEndpoint( scope: Construct, + id: string, props: BuildSagemakerEndpointProps ): BuildSagemakerEndpointResponse { /** Conditional Sagemaker endpoint creation */ if (!props.existingSagemakerEndpointObj) { if (props.modelProps) { - const deploySagemakerEndpointResponse = deploySagemakerEndpoint(scope, props); + const deploySagemakerEndpointResponse = deploySagemakerEndpoint(scope, id, props); return { ...deploySagemakerEndpointResponse }; } else { throw Error('Either existingSagemakerEndpointObj or at least modelProps is required'); @@ -394,6 +396,7 @@ export interface DeploySagemakerEndpointResponse { */ export function deploySagemakerEndpoint( scope: Construct, + id: string, props: BuildSagemakerEndpointProps ): DeploySagemakerEndpointResponse { let model: sagemaker.CfnModel; @@ -422,7 +425,7 @@ export function deploySagemakerEndpoint( // Create Sagemaker Model model = createSagemakerModel(scope, props.modelProps, sagemakerRole, props.vpc); // Create Sagemaker EndpointConfig - endpointConfig = createSagemakerEndpointConfig(scope, model.attrModelName, props.endpointConfigProps); + endpointConfig = createSagemakerEndpointConfig(scope, `${id}`, model.attrModelName, props.endpointConfigProps); // Add dependency on model endpointConfig.addDependency(model); // Create Sagemaker Endpoint @@ -508,6 +511,7 @@ export function createSagemakerModel( */ export function createSagemakerEndpointConfig( scope: Construct, + id: string, modelName: string, endpointConfigProps?: sagemaker.CfnEndpointConfigProps ): sagemaker.CfnEndpointConfig { @@ -519,7 +523,7 @@ export function createSagemakerEndpointConfig( if (endpointConfigProps && endpointConfigProps.kmsKeyId) { kmsKeyId = endpointConfigProps.kmsKeyId; } else { - kmsKeyId = buildEncryptionKey(scope).keyId; + kmsKeyId = buildEncryptionKey(scope, id).keyId; } // Overwrite default EndpointConfig properties diff --git a/source/patterns/@aws-solutions-constructs/core/lib/sns-helper.ts b/source/patterns/@aws-solutions-constructs/core/lib/sns-helper.ts index b82075a24..3e81c4802 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/sns-helper.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/sns-helper.ts @@ -139,7 +139,7 @@ export interface BuildTopicResponse { /** * @internal This is an internal core function and should not be called directly by Solutions Constructs clients. */ -export function buildTopic(scope: Construct, props: BuildTopicProps): BuildTopicResponse { +export function buildTopic(scope: Construct, id: string, props: BuildTopicProps): BuildTopicResponse { if (!props.existingTopicObj) { // Setup the topic properties const snsTopicProps = consolidateProps(DefaultSnsTopicProps, props.topicProps); @@ -154,7 +154,7 @@ export function buildTopic(scope: Construct, props: BuildTopicProps): BuildTopic } else if (props.encryptionKey) { snsTopicProps.masterKey = props.encryptionKey; } else if (props.encryptionKeyProps || props.enableEncryptionWithCustomerManagedKey === true) { - snsTopicProps.masterKey = buildEncryptionKey(scope, props.encryptionKeyProps); + snsTopicProps.masterKey = buildEncryptionKey(scope, id, props.encryptionKeyProps); } else { snsTopicProps.masterKey = kms.Alias.fromAliasName(scope, 'aws-managed-key', 'alias/aws/sns'); } diff --git a/source/patterns/@aws-solutions-constructs/core/lib/sqs-helper.ts b/source/patterns/@aws-solutions-constructs/core/lib/sqs-helper.ts index 4328319a7..318da52ec 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/sqs-helper.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/sqs-helper.ts @@ -103,7 +103,7 @@ export function buildQueue(scope: Construct, id: string, props: BuildQueueProps) } else if (props.encryptionKey) { queueProps.encryptionMasterKey = props.encryptionKey; } else if (props.encryptionKeyProps || props.enableEncryptionWithCustomerManagedKey === true) { - queueProps.encryptionMasterKey = buildEncryptionKey(scope, props.encryptionKeyProps); + queueProps.encryptionMasterKey = buildEncryptionKey(scope, id, props.encryptionKeyProps); } // NOSONAR (typescript:S6330) diff --git a/source/patterns/@aws-solutions-constructs/core/test/kinesis-streams-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/kinesis-streams-helper.test.ts index 12e63a482..54ae9c252 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/kinesis-streams-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/kinesis-streams-helper.test.ts @@ -37,7 +37,7 @@ test('Test deployment w/ custom properties', () => { // Stack const stack = new Stack(); // Helper setup - const encKey = defaults.buildEncryptionKey(stack); + const encKey = defaults.buildEncryptionKey(stack, 'key-test'); // Helper declaration defaults.buildKinesisStream(stack, { kinesisStreamProps: { diff --git a/source/patterns/@aws-solutions-constructs/core/test/kms-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/kms-helper.test.ts index a9d3bb156..44ac35765 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/kms-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/kms-helper.test.ts @@ -23,7 +23,7 @@ test('Test minimal deployment with no properties', () => { // Stack const stack = new Stack(); // Helper declaration - defaults.buildEncryptionKey(stack); + defaults.buildEncryptionKey(stack, 'key-test'); Template.fromStack(stack).hasResource('AWS::KMS::Key', { Type: "AWS::KMS::Key", @@ -40,7 +40,7 @@ test('Test minimal deployment with custom properties', () => { // Stack const stack = new Stack(); // Helper declaration - defaults.buildEncryptionKey(stack, { + defaults.buildEncryptionKey(stack, 'key-test', { enableKeyRotation: false }); diff --git a/source/patterns/@aws-solutions-constructs/core/test/sagemaker-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/sagemaker-helper.test.ts index d496d5633..6067b0003 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/sagemaker-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/sagemaker-helper.test.ts @@ -27,7 +27,7 @@ test('Test deployment with VPC', () => { }); // Build Sagemaker Notebook Instance - const buildSagemakerNotebookResponse = defaults.buildSagemakerNotebook(stack, { + const buildSagemakerNotebookResponse = defaults.buildSagemakerNotebook(stack, 'test', { role: sagemakerRole, }); // Assertion @@ -45,7 +45,7 @@ test('Test deployment without VPC', () => { }); // Build Sagemaker Notebook Instance - const buildSagemakerNotebookResponse = defaults.buildSagemakerNotebook(stack, { + const buildSagemakerNotebookResponse = defaults.buildSagemakerNotebook(stack, 'test', { role: sagemakerRole, deployInsideVpc: false, }); @@ -62,7 +62,7 @@ test('Test deployment w/ existing VPC', () => { assumedBy: new iam.ServicePrincipal('sagemaker.amazonaws.com'), }); // Build Sagemaker Notebook Instance - const buildSagemakerNotebookResponse = defaults.buildSagemakerNotebook(stack, { + const buildSagemakerNotebookResponse = defaults.buildSagemakerNotebook(stack, 'test', { role: sagemakerRole, deployInsideVpc: true, sagemakerNotebookProps: { @@ -90,7 +90,7 @@ test('Test default values encrypt notebook', () => { }); // Build Sagemaker Notebook Instance - defaults.buildSagemakerNotebook(stack, { + defaults.buildSagemakerNotebook(stack, 'test', { role: sagemakerRole, deployInsideVpc: false, }); @@ -98,7 +98,7 @@ test('Test default values encrypt notebook', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::SageMaker::NotebookInstance', { KmsKeyId: { - Ref: "EncryptionKey1B843E66" + Ref: "testKey2C00E5E5" }, }); }); @@ -111,7 +111,7 @@ test('Test deployment w/ override', () => { }); const key = new kms.Key(stack, 'MyEncryptionKey'); // Build Sagemaker Notebook Instance - defaults.buildSagemakerNotebook(stack, { + defaults.buildSagemakerNotebook(stack, 'test', { role: sagemakerRole, sagemakerNotebookProps: { instanceType: 'ml.c4.2xlarge', @@ -136,7 +136,7 @@ test('Test exception', () => { expect(() => { // Build Sagemaker Notebook Instance - defaults.buildSagemakerNotebook(stack, { + defaults.buildSagemakerNotebook(stack, 'test', { role: sagemakerRole, deployInsideVpc: true, sagemakerNotebookProps: { @@ -152,7 +152,7 @@ test('Test exception for not providing primaryContainer in modelProps', () => { const app = () => { // Build Sagemaker Inference Endpoint - defaults.BuildSagemakerEndpoint(stack, { + defaults.BuildSagemakerEndpoint(stack, 'test', { modelProps: {}, }); }; @@ -174,7 +174,7 @@ test('Test exception for not providing modelProps', () => { const app = () => { // Build Sagemaker Inference Endpoint - defaults.deploySagemakerEndpoint(stack, { vpc }); + defaults.deploySagemakerEndpoint(stack, 'test', { vpc }); }; // Assertion 1 expect(app).toThrowError(); @@ -194,7 +194,7 @@ test('Test exception for not providing modelProps or existingSagemkaerObj', () = const app = () => { // Build Sagemaker Inference Endpoint - defaults.BuildSagemakerEndpoint(stack, { vpc }); + defaults.BuildSagemakerEndpoint(stack, 'test', { vpc }); }; // Assertion 1 expect(app).toThrowError(); @@ -225,7 +225,7 @@ test('Test exception for not providing private or isolated subnets in an existin const app = () => { // Build Sagemaker Inference Endpoint - defaults.deploySagemakerEndpoint(stack, { + defaults.deploySagemakerEndpoint(stack, 'test', { modelProps: { primaryContainer: { image: '.dkr.ecr..amazonaws.com/linear-learner:latest', @@ -253,7 +253,7 @@ test('Test fail SageMaker endpoint check', () => { }, }; - const buildSagemakerEndpointResponse = BuildSagemakerEndpoint(stack, { modelProps }); + const buildSagemakerEndpointResponse = BuildSagemakerEndpoint(stack, 'test', { modelProps }); const props: defaults.SagemakerProps = { existingSagemakerEndpointObj: buildSagemakerEndpointResponse.endpoint, diff --git a/source/patterns/@aws-solutions-constructs/core/test/sns-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/sns-helper.test.ts index a0ecf4812..450268ddc 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/sns-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/sns-helper.test.ts @@ -26,7 +26,7 @@ test('Test deployment with no properties using AWS Managed KMS Key', () => { // Stack const stack = new Stack(); // Helper declaration - const buildTopicResponse = defaults.buildTopic(stack, {}); + const buildTopicResponse = defaults.buildTopic(stack, 'test', {}); expect(buildTopicResponse.topic).toBeDefined(); expect(buildTopicResponse.key).toBeDefined(); @@ -61,7 +61,7 @@ test('Test deployment without imported encryption key', () => { // Stack const stack = new Stack(); // Helper declaration - defaults.buildTopic(stack, { + defaults.buildTopic(stack, 'test', { topicProps: { topicName: "custom-topic" }, @@ -85,9 +85,9 @@ test('Test deployment w/ imported encryption key', () => { // Stack const stack = new Stack(); // Generate KMS Key - const key = defaults.buildEncryptionKey(stack); + const key = defaults.buildEncryptionKey(stack, 'key-test'); // Helper declaration - const buildTopicResponse = defaults.buildTopic(stack, { + const buildTopicResponse = defaults.buildTopic(stack, 'test', { topicProps: { topicName: "custom-topic" }, @@ -101,7 +101,7 @@ test('Test deployment w/ imported encryption key', () => { Template.fromStack(stack).hasResourceProperties("AWS::SNS::Topic", { KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "keytestKey8AE2FF0A", "Arn" ] }, @@ -111,15 +111,15 @@ test('Test deployment w/ imported encryption key', () => { test('enableEncryptionWithCustomerManagedKey flag is ignored when encryptionKey is set', () => { const stack = new Stack(); - defaults.buildTopic(stack, { + defaults.buildTopic(stack, 'test', { enableEncryptionWithCustomerManagedKey: false, - encryptionKey: defaults.buildEncryptionKey(stack) + encryptionKey: defaults.buildEncryptionKey(stack, 'key-test') }); Template.fromStack(stack).hasResourceProperties("AWS::SNS::Topic", { KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "keytestKey8AE2FF0A", "Arn" ] } @@ -128,17 +128,17 @@ test('enableEncryptionWithCustomerManagedKey flag is ignored when encryptionKey test('enableEncryptionWithCustomerManagedKey flag is ignored when topicProps.masterKey is set', () => { const stack = new Stack(); - defaults.buildTopic(stack, { + defaults.buildTopic(stack, 'test', { enableEncryptionWithCustomerManagedKey: false, topicProps: { - masterKey: defaults.buildEncryptionKey(stack) + masterKey: defaults.buildEncryptionKey(stack, 'key-test') } }); Template.fromStack(stack).hasResourceProperties("AWS::SNS::Topic", { KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "keytestKey8AE2FF0A", "Arn" ] } @@ -148,7 +148,7 @@ test('enableEncryptionWithCustomerManagedKey flag is ignored when topicProps.mas test('enableEncryptionWithCustomerManagedKey flag is ignored when encryptionKeyProps is set', () => { const stack = new Stack(); const description = "custom description"; - defaults.buildTopic(stack, { + defaults.buildTopic(stack, 'test', { enableEncryptionWithCustomerManagedKey: false, encryptionKeyProps: { description @@ -159,7 +159,7 @@ test('enableEncryptionWithCustomerManagedKey flag is ignored when encryptionKeyP template.hasResourceProperties("AWS::SNS::Topic", { KmsMasterKeyId: { "Fn::GetAtt": [ - "EncryptionKey1B843E66", + "testKey2C00E5E5", "Arn" ] } @@ -173,7 +173,7 @@ test('enableEncryptionWithCustomerManagedKey flag is ignored when encryptionKeyP test('encryptionProps are set correctly on the SNS Topic', () => { const stack = new Stack(); const description = "custom description"; - defaults.buildTopic(stack, { + defaults.buildTopic(stack, 'test', { encryptionKeyProps: { description } @@ -186,7 +186,7 @@ test('encryptionProps are set correctly on the SNS Topic', () => { test('Check SNS Topic policy', () => { const stack = new Stack(); - defaults.buildTopic(stack, {}); + defaults.buildTopic(stack, 'test', {}); const template = Template.fromStack(stack); template.hasResourceProperties("AWS::SNS::TopicPolicy", { @@ -278,7 +278,7 @@ test('existing topic encrypted with CMK is not overridden by defaults', () => { masterKey: cmk }); - defaults.buildTopic(stack, { + defaults.buildTopic(stack, 'test', { existingTopicObj: topic, existingTopicEncryptionKey: cmk }); @@ -296,7 +296,7 @@ test('existing unencrypted topic is not overridden with defaults', () => { const topic = new sns.Topic(stack, 'Topic'); - const buildBuildTopicResponse = defaults.buildTopic(stack, { + const buildBuildTopicResponse = defaults.buildTopic(stack, 'test', { existingTopicObj: topic, }); @@ -400,7 +400,7 @@ test('Test fail SNS topic check when both encryptionKey and topicProps.masterKey test('Test fail encryption key check', () => { const stack = new Stack(); - const key = defaults.buildEncryptionKey(stack, { + const key = defaults.buildEncryptionKey(stack, 'key-test', { enableKeyRotation: false }); diff --git a/source/patterns/@aws-solutions-constructs/core/test/sqs-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/sqs-helper.test.ts index 2d48bda4b..6378568d8 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/sqs-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/sqs-helper.test.ts @@ -45,7 +45,7 @@ test('Test deployment w/ imported encryption key', () => { queueName: 'existing-queue' }, enableEncryptionWithCustomerManagedKey: true, - encryptionKey: defaults.buildEncryptionKey(stack) + encryptionKey: defaults.buildEncryptionKey(stack, 'key-test') }); const template = Template.fromStack(stack); From 34d685dd0efe09fa68a8f2fac658a950aa53aa34 Mon Sep 17 00:00:00 2001 From: biffgaut Date: Thu, 11 Apr 2024 21:48:11 -0400 Subject: [PATCH 2/2] Added test to check Issue 1101 --- .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 215 +++ .../snssqs-allow-two-instances.assets.json | 19 + .../snssqs-allow-two-instances.template.json | 797 ++++++++++++ ...efaultTestDeployAssertC014EB6B.assets.json | 19 + ...aultTestDeployAssertC014EB6B.template.json | 36 + .../tree.json | 1149 +++++++++++++++++ .../test/integ.snssqs-allow-two-instances.ts | 46 + 9 files changed, 2294 insertions(+) create mode 100644 source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/cdk.out create mode 100644 source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/integ.json create mode 100644 source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/manifest.json create mode 100644 source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqs-allow-two-instances.assets.json create mode 100644 source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqs-allow-two-instances.template.json create mode 100644 source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.assets.json create mode 100644 source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.template.json create mode 100644 source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/tree.json create mode 100644 source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.ts diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/cdk.out new file mode 100644 index 000000000..1f0068d32 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/integ.json new file mode 100644 index 000000000..e35e68553 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "snssqs-allow-two-instances/Integ/DefaultTest": { + "stacks": [ + "snssqs-allow-two-instances" + ], + "assertionStack": "snssqs-allow-two-instances/Integ/DefaultTest/DeployAssert", + "assertionStackName": "snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B" + } + } +} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/manifest.json new file mode 100644 index 000000000..00671d3a4 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/manifest.json @@ -0,0 +1,215 @@ +{ + "version": "36.0.0", + "artifacts": { + "snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "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": [ + "snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.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": [ + "snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.assets" + ], + "metadata": { + "/snssqs-allow-two-instances/Integ/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/snssqs-allow-two-instances/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "snssqs-allow-two-instances/Integ/DefaultTest/DeployAssert" + }, + "snssqs-allow-two-instances.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "snssqs-allow-two-instances.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "snssqs-allow-two-instances": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "snssqs-allow-two-instances.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "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}/29e172839a243c79c69adc9df2647191a7a64b7505176160571f16b65f46e0e4.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "snssqs-allow-two-instances.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": [ + "snssqs-allow-two-instances.assets" + ], + "metadata": { + "/snssqs-allow-two-instances/test-sns-sqs-stack/deadLetterQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstackdeadLetterQueue83D183F2" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack/deadLetterQueue/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstackdeadLetterQueuePolicy388F06A8" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack/SnsTopic/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstackSnsTopic92693DD8" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack/SnsTopic/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstackSnsTopicPolicyBD0740CC" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack/queue": [ + { + "type": "aws:cdk:warning", + "data": "encryption: Automatically changed to QueueEncryption.KMS, was: QueueEncryption.KMS_MANAGED\nWhen encryptionMasterKey is provided, always set `encryption: QueueEncryption.KMS` [ack: @aws-cdk/aws-sqs:queueEncryptionChangedToKMS]" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack/queue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstackqueue908D8D48" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack/queue/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstackqueuePolicyFD3F4725" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack/queue/snssqsallowtwoinstancestestsnssqsstackSnsTopic17B8A443/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstackqueuesnssqsallowtwoinstancestestsnssqsstackSnsTopic17B8A4430742203E" + } + ], + "/snssqs-allow-two-instances/'test-sns-sqs-stackKey'/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstackKeyCECC9471" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack-two/deadLetterQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstacktwodeadLetterQueueE2CAC509" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack-two/deadLetterQueue/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstacktwodeadLetterQueuePolicyDC6FD645" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack-two/SnsTopic/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstacktwoSnsTopicA8E12211" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack-two/SnsTopic/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstacktwoSnsTopicPolicy70FF6492" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack-two/queue": [ + { + "type": "aws:cdk:warning", + "data": "encryption: Automatically changed to QueueEncryption.KMS, was: QueueEncryption.KMS_MANAGED\nWhen encryptionMasterKey is provided, always set `encryption: QueueEncryption.KMS` [ack: @aws-cdk/aws-sqs:queueEncryptionChangedToKMS]" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack-two/queue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstacktwoqueue1D59436B" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack-two/queue/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstacktwoqueuePolicyDCE23166" + } + ], + "/snssqs-allow-two-instances/test-sns-sqs-stack-two/queue/snssqsallowtwoinstancestestsnssqsstacktwoSnsTopic1C756550/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstacktwoqueuesnssqsallowtwoinstancestestsnssqsstacktwoSnsTopic1C7565503C911576" + } + ], + "/snssqs-allow-two-instances/'test-sns-sqs-stack-twoKey'/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "testsnssqsstacktwoKey2932E7DF" + } + ], + "/snssqs-allow-two-instances/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/snssqs-allow-two-instances/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "snssqs-allow-two-instances" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqs-allow-two-instances.assets.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqs-allow-two-instances.assets.json new file mode 100644 index 000000000..4df893f71 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqs-allow-two-instances.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "29e172839a243c79c69adc9df2647191a7a64b7505176160571f16b65f46e0e4": { + "source": { + "path": "snssqs-allow-two-instances.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "29e172839a243c79c69adc9df2647191a7a64b7505176160571f16b65f46e0e4.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-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqs-allow-two-instances.template.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqs-allow-two-instances.template.json new file mode 100644 index 000000000..04d782fb7 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqs-allow-two-instances.template.json @@ -0,0 +1,797 @@ +{ + "Description": "Integration Test for aws-sns-sqs", + "Resources": { + "testsnssqsstackdeadLetterQueue83D183F2": { + "Type": "AWS::SQS::Queue", + "Properties": { + "KmsMasterKeyId": "alias/aws/sqs" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "testsnssqsstackdeadLetterQueuePolicy388F06A8": { + "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": [ + "testsnssqsstackdeadLetterQueue83D183F2", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstackdeadLetterQueue83D183F2", + "Arn" + ] + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "Queues": [ + { + "Ref": "testsnssqsstackdeadLetterQueue83D183F2" + } + ] + } + }, + "testsnssqsstackSnsTopic92693DD8": { + "Type": "AWS::SNS::Topic", + "Properties": { + "KmsMasterKeyId": { + "Fn::GetAtt": [ + "testsnssqsstackKeyCECC9471", + "Arn" + ] + } + } + }, + "testsnssqsstackSnsTopicPolicyBD0740CC": { + "Type": "AWS::SNS::TopicPolicy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "SNS:AddPermission", + "SNS:DeleteTopic", + "SNS:GetTopicAttributes", + "SNS:ListSubscriptionsByTopic", + "SNS:Publish", + "SNS:Receive", + "SNS:RemovePermission", + "SNS:SetTopicAttributes", + "SNS:Subscribe" + ], + "Condition": { + "StringEquals": { + "AWS:SourceOwner": { + "Ref": "AWS::AccountId" + } + } + }, + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": { + "Ref": "testsnssqsstackSnsTopic92693DD8" + }, + "Sid": "TopicOwnerOnlyAccess" + }, + { + "Action": [ + "SNS:AddPermission", + "SNS:DeleteTopic", + "SNS:GetTopicAttributes", + "SNS:ListSubscriptionsByTopic", + "SNS:Publish", + "SNS:Receive", + "SNS:RemovePermission", + "SNS:SetTopicAttributes", + "SNS:Subscribe" + ], + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Ref": "testsnssqsstackSnsTopic92693DD8" + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "Topics": [ + { + "Ref": "testsnssqsstackSnsTopic92693DD8" + } + ] + } + }, + "testsnssqsstackqueue908D8D48": { + "Type": "AWS::SQS::Queue", + "Properties": { + "KmsMasterKeyId": { + "Fn::GetAtt": [ + "testsnssqsstackKeyCECC9471", + "Arn" + ] + }, + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "testsnssqsstackdeadLetterQueue83D183F2", + "Arn" + ] + }, + "maxReceiveCount": 15 + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "testsnssqsstackqueuePolicyFD3F4725": { + "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": [ + "testsnssqsstackqueue908D8D48", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstackqueue908D8D48", + "Arn" + ] + }, + "Sid": "HttpsOnly" + }, + { + "Action": "sqs:SendMessage", + "Condition": { + "ArnEquals": { + "aws:SourceArn": { + "Ref": "testsnssqsstackSnsTopic92693DD8" + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstackqueue908D8D48", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "Queues": [ + { + "Ref": "testsnssqsstackqueue908D8D48" + } + ] + } + }, + "testsnssqsstackqueuesnssqsallowtwoinstancestestsnssqsstackSnsTopic17B8A4430742203E": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "testsnssqsstackqueue908D8D48", + "Arn" + ] + }, + "Protocol": "sqs", + "TopicArn": { + "Ref": "testsnssqsstackSnsTopic92693DD8" + } + }, + "DependsOn": [ + "testsnssqsstackqueuePolicyFD3F4725" + ] + }, + "testsnssqsstackKeyCECC9471": { + "Type": "AWS::KMS::Key", + "Properties": { + "EnableKeyRotation": true, + "KeyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:GenerateDataKey", + "kms:GenerateDataKey*" + ], + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Resource": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:Encrypt" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "testsnssqsstacktwodeadLetterQueueE2CAC509": { + "Type": "AWS::SQS::Queue", + "Properties": { + "KmsMasterKeyId": "alias/aws/sqs" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "testsnssqsstacktwodeadLetterQueuePolicyDC6FD645": { + "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": [ + "testsnssqsstacktwodeadLetterQueueE2CAC509", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstacktwodeadLetterQueueE2CAC509", + "Arn" + ] + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "Queues": [ + { + "Ref": "testsnssqsstacktwodeadLetterQueueE2CAC509" + } + ] + } + }, + "testsnssqsstacktwoSnsTopicA8E12211": { + "Type": "AWS::SNS::Topic", + "Properties": { + "KmsMasterKeyId": { + "Fn::GetAtt": [ + "testsnssqsstacktwoKey2932E7DF", + "Arn" + ] + } + } + }, + "testsnssqsstacktwoSnsTopicPolicy70FF6492": { + "Type": "AWS::SNS::TopicPolicy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "SNS:AddPermission", + "SNS:DeleteTopic", + "SNS:GetTopicAttributes", + "SNS:ListSubscriptionsByTopic", + "SNS:Publish", + "SNS:Receive", + "SNS:RemovePermission", + "SNS:SetTopicAttributes", + "SNS:Subscribe" + ], + "Condition": { + "StringEquals": { + "AWS:SourceOwner": { + "Ref": "AWS::AccountId" + } + } + }, + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": { + "Ref": "testsnssqsstacktwoSnsTopicA8E12211" + }, + "Sid": "TopicOwnerOnlyAccess" + }, + { + "Action": [ + "SNS:AddPermission", + "SNS:DeleteTopic", + "SNS:GetTopicAttributes", + "SNS:ListSubscriptionsByTopic", + "SNS:Publish", + "SNS:Receive", + "SNS:RemovePermission", + "SNS:SetTopicAttributes", + "SNS:Subscribe" + ], + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Ref": "testsnssqsstacktwoSnsTopicA8E12211" + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "Topics": [ + { + "Ref": "testsnssqsstacktwoSnsTopicA8E12211" + } + ] + } + }, + "testsnssqsstacktwoqueue1D59436B": { + "Type": "AWS::SQS::Queue", + "Properties": { + "KmsMasterKeyId": { + "Fn::GetAtt": [ + "testsnssqsstacktwoKey2932E7DF", + "Arn" + ] + }, + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "testsnssqsstacktwodeadLetterQueueE2CAC509", + "Arn" + ] + }, + "maxReceiveCount": 15 + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "testsnssqsstacktwoqueuePolicyDCE23166": { + "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": [ + "testsnssqsstacktwoqueue1D59436B", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstacktwoqueue1D59436B", + "Arn" + ] + }, + "Sid": "HttpsOnly" + }, + { + "Action": "sqs:SendMessage", + "Condition": { + "ArnEquals": { + "aws:SourceArn": { + "Ref": "testsnssqsstacktwoSnsTopicA8E12211" + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstacktwoqueue1D59436B", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "Queues": [ + { + "Ref": "testsnssqsstacktwoqueue1D59436B" + } + ] + } + }, + "testsnssqsstacktwoqueuesnssqsallowtwoinstancestestsnssqsstacktwoSnsTopic1C7565503C911576": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "testsnssqsstacktwoqueue1D59436B", + "Arn" + ] + }, + "Protocol": "sqs", + "TopicArn": { + "Ref": "testsnssqsstacktwoSnsTopicA8E12211" + } + }, + "DependsOn": [ + "testsnssqsstacktwoqueuePolicyDCE23166" + ] + }, + "testsnssqsstacktwoKey2932E7DF": { + "Type": "AWS::KMS::Key", + "Properties": { + "EnableKeyRotation": true, + "KeyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:GenerateDataKey", + "kms:GenerateDataKey*" + ], + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Resource": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:Encrypt" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + } + }, + "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-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.assets.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.assets.json new file mode 100644 index 000000000..ecefdc7d7 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.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-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.template.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.template.json new file mode 100644 index 000000000..ad9d0fb73 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/snssqsallowtwoinstancesIntegDefaultTestDeployAssertC014EB6B.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-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/tree.json new file mode 100644 index 000000000..bcd61cb00 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.js.snapshot/tree.json @@ -0,0 +1,1149 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "snssqs-allow-two-instances": { + "id": "snssqs-allow-two-instances", + "path": "snssqs-allow-two-instances", + "children": { + "test-sns-sqs-stack": { + "id": "test-sns-sqs-stack", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack", + "children": { + "deadLetterQueue": { + "id": "deadLetterQueue", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/deadLetterQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/deadLetterQueue/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.135.0" + } + }, + "Policy": { + "id": "Policy", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/deadLetterQueue/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/deadLetterQueue/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": [ + "testsnssqsstackdeadLetterQueue83D183F2", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstackdeadLetterQueue83D183F2", + "Arn" + ] + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "queues": [ + { + "Ref": "testsnssqsstackdeadLetterQueue83D183F2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "2.135.0" + } + }, + "SnsTopic": { + "id": "SnsTopic", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/SnsTopic", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/SnsTopic/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SNS::Topic", + "aws:cdk:cloudformation:props": { + "kmsMasterKeyId": { + "Fn::GetAtt": [ + "testsnssqsstackKeyCECC9471", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "2.135.0" + } + }, + "Policy": { + "id": "Policy", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/SnsTopic/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/SnsTopic/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SNS::TopicPolicy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "SNS:AddPermission", + "SNS:DeleteTopic", + "SNS:GetTopicAttributes", + "SNS:ListSubscriptionsByTopic", + "SNS:Publish", + "SNS:Receive", + "SNS:RemovePermission", + "SNS:SetTopicAttributes", + "SNS:Subscribe" + ], + "Condition": { + "StringEquals": { + "AWS:SourceOwner": { + "Ref": "AWS::AccountId" + } + } + }, + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": { + "Ref": "testsnssqsstackSnsTopic92693DD8" + }, + "Sid": "TopicOwnerOnlyAccess" + }, + { + "Action": [ + "SNS:AddPermission", + "SNS:DeleteTopic", + "SNS:GetTopicAttributes", + "SNS:ListSubscriptionsByTopic", + "SNS:Publish", + "SNS:Receive", + "SNS:RemovePermission", + "SNS:SetTopicAttributes", + "SNS:Subscribe" + ], + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Ref": "testsnssqsstackSnsTopic92693DD8" + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "topics": [ + { + "Ref": "testsnssqsstackSnsTopic92693DD8" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "2.135.0" + } + }, + "queue": { + "id": "queue", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/queue", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/queue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "kmsMasterKeyId": { + "Fn::GetAtt": [ + "testsnssqsstackKeyCECC9471", + "Arn" + ] + }, + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "testsnssqsstackdeadLetterQueue83D183F2", + "Arn" + ] + }, + "maxReceiveCount": 15 + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", + "version": "2.135.0" + } + }, + "Policy": { + "id": "Policy", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/queue/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/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": [ + "testsnssqsstackqueue908D8D48", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstackqueue908D8D48", + "Arn" + ] + }, + "Sid": "HttpsOnly" + }, + { + "Action": "sqs:SendMessage", + "Condition": { + "ArnEquals": { + "aws:SourceArn": { + "Ref": "testsnssqsstackSnsTopic92693DD8" + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstackqueue908D8D48", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "queues": [ + { + "Ref": "testsnssqsstackqueue908D8D48" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", + "version": "2.135.0" + } + }, + "snssqsallowtwoinstancestestsnssqsstackSnsTopic17B8A443": { + "id": "snssqsallowtwoinstancestestsnssqsstackSnsTopic17B8A443", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/queue/snssqsallowtwoinstancestestsnssqsstackSnsTopic17B8A443", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack/queue/snssqsallowtwoinstancestestsnssqsstackSnsTopic17B8A443/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SNS::Subscription", + "aws:cdk:cloudformation:props": { + "endpoint": { + "Fn::GetAtt": [ + "testsnssqsstackqueue908D8D48", + "Arn" + ] + }, + "protocol": "sqs", + "topicArn": { + "Ref": "testsnssqsstackSnsTopic92693DD8" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-solutions-constructs/aws-sns-sqs.SnsToSqs", + "version": "2.54.1" + } + }, + "'test-sns-sqs-stackKey'": { + "id": "'test-sns-sqs-stackKey'", + "path": "snssqs-allow-two-instances/'test-sns-sqs-stackKey'", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/'test-sns-sqs-stackKey'/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::KMS::Key", + "aws:cdk:cloudformation:props": { + "enableKeyRotation": true, + "keyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:GenerateDataKey", + "kms:GenerateDataKey*" + ], + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Resource": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:Encrypt" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.CfnKey", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.Key", + "version": "2.135.0" + } + }, + "test-sns-sqs-stack-two": { + "id": "test-sns-sqs-stack-two", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two", + "children": { + "deadLetterQueue": { + "id": "deadLetterQueue", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/deadLetterQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/deadLetterQueue/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.135.0" + } + }, + "Policy": { + "id": "Policy", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/deadLetterQueue/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/deadLetterQueue/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": [ + "testsnssqsstacktwodeadLetterQueueE2CAC509", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstacktwodeadLetterQueueE2CAC509", + "Arn" + ] + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "queues": [ + { + "Ref": "testsnssqsstacktwodeadLetterQueueE2CAC509" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "2.135.0" + } + }, + "SnsTopic": { + "id": "SnsTopic", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/SnsTopic", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/SnsTopic/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SNS::Topic", + "aws:cdk:cloudformation:props": { + "kmsMasterKeyId": { + "Fn::GetAtt": [ + "testsnssqsstacktwoKey2932E7DF", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "2.135.0" + } + }, + "Policy": { + "id": "Policy", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/SnsTopic/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/SnsTopic/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SNS::TopicPolicy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "SNS:AddPermission", + "SNS:DeleteTopic", + "SNS:GetTopicAttributes", + "SNS:ListSubscriptionsByTopic", + "SNS:Publish", + "SNS:Receive", + "SNS:RemovePermission", + "SNS:SetTopicAttributes", + "SNS:Subscribe" + ], + "Condition": { + "StringEquals": { + "AWS:SourceOwner": { + "Ref": "AWS::AccountId" + } + } + }, + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": { + "Ref": "testsnssqsstacktwoSnsTopicA8E12211" + }, + "Sid": "TopicOwnerOnlyAccess" + }, + { + "Action": [ + "SNS:AddPermission", + "SNS:DeleteTopic", + "SNS:GetTopicAttributes", + "SNS:ListSubscriptionsByTopic", + "SNS:Publish", + "SNS:Receive", + "SNS:RemovePermission", + "SNS:SetTopicAttributes", + "SNS:Subscribe" + ], + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Ref": "testsnssqsstacktwoSnsTopicA8E12211" + }, + "Sid": "HttpsOnly" + } + ], + "Version": "2012-10-17" + }, + "topics": [ + { + "Ref": "testsnssqsstacktwoSnsTopicA8E12211" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "2.135.0" + } + }, + "queue": { + "id": "queue", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/queue", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/queue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "kmsMasterKeyId": { + "Fn::GetAtt": [ + "testsnssqsstacktwoKey2932E7DF", + "Arn" + ] + }, + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "testsnssqsstacktwodeadLetterQueueE2CAC509", + "Arn" + ] + }, + "maxReceiveCount": 15 + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", + "version": "2.135.0" + } + }, + "Policy": { + "id": "Policy", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/queue/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/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": [ + "testsnssqsstacktwoqueue1D59436B", + "Arn" + ] + }, + "Sid": "QueueOwnerOnlyAccess" + }, + { + "Action": "SQS:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstacktwoqueue1D59436B", + "Arn" + ] + }, + "Sid": "HttpsOnly" + }, + { + "Action": "sqs:SendMessage", + "Condition": { + "ArnEquals": { + "aws:SourceArn": { + "Ref": "testsnssqsstacktwoSnsTopicA8E12211" + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "testsnssqsstacktwoqueue1D59436B", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "queues": [ + { + "Ref": "testsnssqsstacktwoqueue1D59436B" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", + "version": "2.135.0" + } + }, + "snssqsallowtwoinstancestestsnssqsstacktwoSnsTopic1C756550": { + "id": "snssqsallowtwoinstancestestsnssqsstacktwoSnsTopic1C756550", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/queue/snssqsallowtwoinstancestestsnssqsstacktwoSnsTopic1C756550", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/test-sns-sqs-stack-two/queue/snssqsallowtwoinstancestestsnssqsstacktwoSnsTopic1C756550/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SNS::Subscription", + "aws:cdk:cloudformation:props": { + "endpoint": { + "Fn::GetAtt": [ + "testsnssqsstacktwoqueue1D59436B", + "Arn" + ] + }, + "protocol": "sqs", + "topicArn": { + "Ref": "testsnssqsstacktwoSnsTopicA8E12211" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-solutions-constructs/aws-sns-sqs.SnsToSqs", + "version": "2.54.1" + } + }, + "'test-sns-sqs-stack-twoKey'": { + "id": "'test-sns-sqs-stack-twoKey'", + "path": "snssqs-allow-two-instances/'test-sns-sqs-stack-twoKey'", + "children": { + "Resource": { + "id": "Resource", + "path": "snssqs-allow-two-instances/'test-sns-sqs-stack-twoKey'/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::KMS::Key", + "aws:cdk:cloudformation:props": { + "enableKeyRotation": true, + "keyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:GenerateDataKey", + "kms:GenerateDataKey*" + ], + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Resource": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:Encrypt" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.CfnKey", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.Key", + "version": "2.135.0" + } + }, + "Integ": { + "id": "Integ", + "path": "snssqs-allow-two-instances/Integ", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "snssqs-allow-two-instances/Integ/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "snssqs-allow-two-instances/Integ/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "snssqs-allow-two-instances/Integ/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "snssqs-allow-two-instances/Integ/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "2.135.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "snssqs-allow-two-instances/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "2.135.0-alpha.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "2.135.0-alpha.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "snssqs-allow-two-instances/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "2.135.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "snssqs-allow-two-instances/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "2.135.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "2.135.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "2.135.0" + } + } +} \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.ts b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.ts new file mode 100644 index 000000000..573314b54 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-sns-sqs/test/integ.snssqs-allow-two-instances.ts @@ -0,0 +1,46 @@ +/** + * 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 { SnsToSqs, SnsToSqsProps } from "../lib"; +import * as iam from 'aws-cdk-lib/aws-iam'; +import { generateIntegStackName } from '@aws-solutions-constructs/core'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +// Setup +const app = new App(); +const stack = new Stack(app, generateIntegStackName(__filename)); +stack.templateOptions.description = 'Integration Test for aws-sns-sqs'; +stack.node.setContext("@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption", false); + +// Definitions +const props: SnsToSqsProps = {}; + +const snsToSqsStack = new SnsToSqs(stack, 'test-sns-sqs-stack', props); +const snsToSqsStackTwo = new SnsToSqs(stack, 'test-sns-sqs-stack-two', props); + +// Grant yourself permissions to use the Customer Managed KMS Key +const policyStatement = new iam.PolicyStatement({ + actions: ["kms:Encrypt", "kms:Decrypt"], + effect: iam.Effect.ALLOW, + principals: [ new iam.AccountRootPrincipal() ], + resources: [ "*" ] +}); + +snsToSqsStack.encryptionKey?.addToResourcePolicy(policyStatement); +snsToSqsStackTwo.encryptionKey?.addToResourcePolicy(policyStatement); + +new IntegTest(stack, 'Integ', { testCases: [ + stack +] });