From d130bd742a7b016311f56dd217b87bcbbedf6521 Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Wed, 19 Jul 2023 12:04:56 -0400 Subject: [PATCH] fix(core): cross region exports fail when parameter doesn't exist (#26434) The JavaScript SDK v3 handles errors differently than v2. This update was missed when we upgraded the code to SDK v3. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../__entrypoint__.js | 0 .../index.js | 13 +- .../__entrypoint__.js | 0 .../index.js | 4 +- .../integ-acm-stack.assets.json | 10 +- .../integ-acm-stack.template.json | 2 +- .../integ-cloudfront-stack.assets.json | 10 +- .../integ-cloudfront-stack.template.json | 2 +- .../integ.json | 2 +- .../manifest.json | 4 +- .../integ.cloudfront-cross-region-cert.ts | 2 +- .../__entrypoint__.js | 0 .../index.js | 4 +- ...b732e39f9a17bfcca0bf8d20ce4f61.assets.json | 10 +- ...32e39f9a17bfcca0bf8d20ce4f61.template.json | 2 +- .../integ-https-redirect.assets.json | 10 +- .../integ-https-redirect.template.json | 14 +- .../integ.json | 1 + .../manifest.json | 4 +- .../tree.json | 152 +++++++++--------- .../cross-region-ssm-reader-handler/index.ts | 12 +- .../cross-region-ssm-reader-handler.test.ts | 34 +++- 22 files changed, 161 insertions(+), 131 deletions(-) rename packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/{asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43 => asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d}/__entrypoint__.js (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/{asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43 => asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d}/index.js (53%) rename packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/{asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1 => asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707}/__entrypoint__.js (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/{asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1 => asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707}/index.js (53%) rename packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/{asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1 => asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707}/__entrypoint__.js (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/{asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1 => asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707}/index.js (53%) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d/__entrypoint__.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d/__entrypoint__.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d/index.js similarity index 53% rename from packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d/index.js index e76abd7327471..e2c67495acd24 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43/index.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d/index.js @@ -77,12 +77,11 @@ async function removeTags(ssm, parameters, keyName) { }); } catch (e) { - switch (e.code) { - // if the parameter doesn't exist then there is nothing to release - case 'InvalidResourceId': - return; - default: - throw new Error(`Error releasing import ${name}: ${e}`); + if (e instanceof client_ssm_1.InvalidResourceId) { + return; + } + else { + throw new Error(`Error releasing import ${name}: ${e}`); } } })); @@ -96,4 +95,4 @@ async function removeTags(ssm, parameters, keyName) { function except(source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lcicsXG4gICAgICAgIFJlc291cmNlSWQ6IG5hbWUsXG4gICAgICB9KTtcbiAgICB9IGNhdGNoIChlOiBhbnkpIHtcbiAgICAgIGlmIChlIGluc3RhbmNlb2YgSW52YWxpZFJlc291cmNlSWQpIHtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBFcnJvciByZWxlYXNpbmcgaW1wb3J0ICR7bmFtZX06ICR7ZX1gKTtcbiAgICAgIH1cbiAgICB9XG4gIH0pKTtcbn1cblxuLyoqXG4gKiBSZXR1cm4gb25seSB0aGUgaXRlbXMgZnJvbSBzb3VyY2UgdGhhdCBkbyBub3QgZXhpc3QgaW4gdGhlIGZpbHRlclxuICpcbiAqIEBwYXJhbSBzb3VyY2UgdGhlIHNvdXJjZSBvYmplY3QgdG8gcGVyZm9ybSB0aGUgZmlsdGVyIG9uXG4gKiBAcGFyYW0gZmlsdGVyIGZpbHRlciBvdXQgaXRlbXMgdGhhdCBleGlzdCBpbiB0aGlzIG9iamVjdFxuICovXG5mdW5jdGlvbiBleGNlcHQoc291cmNlOiBzdHJpbmdbXSwgZmlsdGVyOiBzdHJpbmdbXSk6IHN0cmluZ1tdIHtcbiAgcmV0dXJuIHNvdXJjZS5maWx0ZXIoa2V5ID0+ICFmaWx0ZXIuaW5jbHVkZXMoa2V5KSk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707/__entrypoint__.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707/__entrypoint__.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707/index.js similarity index 53% rename from packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707/index.js index 2afa65bd693b1..e894e25b491e5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1/index.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707/index.js @@ -111,7 +111,7 @@ async function isInUse(ssm, parameterName) { catch (e) { // an InvalidResourceId means that the parameter doesn't exist // which we should ignore since that means it's not in use - if (e.code === 'InvalidResourceId') { + if (e instanceof client_ssm_1.InvalidResourceId) { return new Set(); } throw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VzaChjdXJyKTtcbiAgICAgIHJldHVybiBhY2M7XG4gICAgfSwgW10pO1xufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-acm-stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-acm-stack.assets.json index eb89883aab7d3..a655df72cca96 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-acm-stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-acm-stack.assets.json @@ -1,21 +1,21 @@ { "version": "32.0.0", "files": { - "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1": { + "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707": { "source": { - "path": "asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1", + "path": "asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707", "packaging": "zip" }, "destinations": { "12345678-us-east-1": { "bucketName": "cdk-hnb659fds-assets-12345678-us-east-1", - "objectKey": "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1.zip", + "objectKey": "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-us-east-1" } } }, - "06ebf41a5e3b2f5b37553cd7bd38b7293f0f3fd1224562144b6ae4da7cd9507f": { + "4b7e1b4f4a5deee38294099c4a003b61c29ecb742f56bf99436b39b72a7bf306": { "source": { "path": "integ-acm-stack.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "12345678-us-east-1": { "bucketName": "cdk-hnb659fds-assets-12345678-us-east-1", - "objectKey": "06ebf41a5e3b2f5b37553cd7bd38b7293f0f3fd1224562144b6ae4da7cd9507f.json", + "objectKey": "4b7e1b4f4a5deee38294099c4a003b61c29ecb742f56bf99436b39b72a7bf306.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-us-east-1" } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-acm-stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-acm-stack.template.json index 5f91b0ea82ffb..b4c89dc230be3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-acm-stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-acm-stack.template.json @@ -89,7 +89,7 @@ "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-12345678-us-east-1", - "S3Key": "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1.zip" + "S3Key": "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707.zip" }, "Timeout": 900, "MemorySize": 128, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-cloudfront-stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-cloudfront-stack.assets.json index 77786cb073c15..97b75603e7bcf 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-cloudfront-stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-cloudfront-stack.assets.json @@ -1,21 +1,21 @@ { "version": "32.0.0", "files": { - "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43": { + "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d": { "source": { - "path": "asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43", + "path": "asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d", "packaging": "zip" }, "destinations": { "12345678-us-east-2": { "bucketName": "cdk-hnb659fds-assets-12345678-us-east-2", - "objectKey": "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43.zip", + "objectKey": "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d.zip", "region": "us-east-2", "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-us-east-2" } } }, - "36037c7546d57106e4e45e3cf67becfa56671ba0b756e3babc4835933ea854ca": { + "8bf7005bb92668630dede945c73a8aaf5d15697928c0ac998f5f62c7b36c0116": { "source": { "path": "integ-cloudfront-stack.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "12345678-us-east-2": { "bucketName": "cdk-hnb659fds-assets-12345678-us-east-2", - "objectKey": "36037c7546d57106e4e45e3cf67becfa56671ba0b756e3babc4835933ea854ca.json", + "objectKey": "8bf7005bb92668630dede945c73a8aaf5d15697928c0ac998f5f62c7b36c0116.json", "region": "us-east-2", "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-us-east-2" } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-cloudfront-stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-cloudfront-stack.template.json index 67e37c0ab878c..f1302da2f59dc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-cloudfront-stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-cloudfront-stack.template.json @@ -104,7 +104,7 @@ "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-12345678-us-east-2", - "S3Key": "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43.zip" + "S3Key": "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d.zip" }, "Timeout": 900, "MemorySize": 128, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ.json index 619ca65757306..6f22a44e86cb1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ.json @@ -6,7 +6,7 @@ "stacks": [ "integ-cloudfront-stack" ], - "diffAssets": false, + "diffAssets": true, "assertionStack": "integ-cloudfront-cross-region-acm/DefaultTest/DeployAssert", "assertionStackName": "integcloudfrontcrossregionacmDefaultTestDeployAssertD48673AA" } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/manifest.json index 644ee37633120..43a2f37a4ad17 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/manifest.json @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-deploy-role-12345678-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-cfn-exec-role-12345678-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-us-east-1/06ebf41a5e3b2f5b37553cd7bd38b7293f0f3fd1224562144b6ae4da7cd9507f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-us-east-1/4b7e1b4f4a5deee38294099c4a003b61c29ecb742f56bf99436b39b72a7bf306.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -88,7 +88,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-deploy-role-12345678-us-east-2", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-cfn-exec-role-12345678-us-east-2", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-us-east-2/36037c7546d57106e4e45e3cf67becfa56671ba0b756e3babc4835933ea854ca.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-us-east-2/8bf7005bb92668630dede945c73a8aaf5d15697928c0ac998f5f62c7b36c0116.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.ts index 83843333d8f35..0ce961ac1b94e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.ts @@ -50,6 +50,6 @@ new cloudfront.Distribution(cloudFrontStack, 'Distro', { new IntegTest(app, 'integ-cloudfront-cross-region-acm', { testCases: [cloudFrontStack], - diffAssets: false, + diffAssets: true, enableLookups: true, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707/__entrypoint__.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707/__entrypoint__.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707/index.js similarity index 53% rename from packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707/index.js index 2afa65bd693b1..e894e25b491e5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1/index.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707/index.js @@ -111,7 +111,7 @@ async function isInUse(ssm, parameterName) { catch (e) { // an InvalidResourceId means that the parameter doesn't exist // which we should ignore since that means it's not in use - if (e.code === 'InvalidResourceId') { + if (e instanceof client_ssm_1.InvalidResourceId) { return new Set(); } throw e; @@ -149,4 +149,4 @@ function changed(oldParams, newParams) { return acc; }, []); } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2QkFBNkI7QUFDN0Isc0RBQXNEO0FBQ3RELG9EQUEwQztBQUduQyxLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtEO0lBQzlFLE1BQU0sS0FBSyxHQUF3QixLQUFLLENBQUMsa0JBQWtCLENBQUMsV0FBVyxDQUFDO0lBQ3hFLE1BQU0sT0FBTyxHQUFHLEtBQUssQ0FBQyxPQUE2QixDQUFDO0lBRXBELE1BQU0sR0FBRyxHQUFHLElBQUksZ0JBQUcsQ0FBQyxFQUFFLE1BQU0sRUFBRSxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQztJQUM5QyxJQUFJO1FBQ0YsUUFBUSxLQUFLLENBQUMsV0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MgdGhlIGV4cG9ydHMgZm9yIHRoZSBjdXJyZW50IGV4ZWN1dGlvblxuICogQHJldHVybnMgYW55IHBhcmFtZXRlcnMgdGhhdCBoYXZlIGRpZmZlcmVudCB2YWx1ZXNcbiAqL1xuZnVuY3Rpb24gY2hhbmdlZChvbGRQYXJhbXM6IENyb3NzUmVnaW9uRXhwb3J0cywgbmV3UGFyYW1zOiBDcm9zc1JlZ2lvbkV4cG9ydHMpOiBzdHJpbmdbXSB7XG4gIHJldHVybiBPYmplY3Qua2V5cyhvbGRQYXJhbXMpXG4gICAgLmZpbHRlcihrZXkgPT4gKG5ld1BhcmFtcy5oYXNPd25Qcm9wZXJ0eShrZXkpICYmIG9sZFBhcmFtc1trZXldICE9PSBuZXdQYXJhbXNba2V5XSkpXG4gICAgLnJlZHVjZSgoYWNjOiBzdHJpbmdbXSwgY3Vycjogc3RyaW5nKSA9PiB7XG4gICAgICBhY2MucHVzaChjdXJyKTtcbiAgICAgIHJldHVybiBhY2M7XG4gICAgfSwgW10pO1xufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets.json index d2d558f52e959..5bd34fd7eb9d4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets.json @@ -1,21 +1,21 @@ { "version": "32.0.0", "files": { - "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1": { + "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707": { "source": { - "path": "asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1", + "path": "asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1.zip", + "objectKey": "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "e20e7104d895f82937f573dfabacaff07374e349c39f1b7cbdb8cef88c0d305c": { + "791d3baf8332708fce423c49cba397293598f9fde56970e3d3f3381c734654e2": { "source": { "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "e20e7104d895f82937f573dfabacaff07374e349c39f1b7cbdb8cef88c0d305c.json", + "objectKey": "791d3baf8332708fce423c49cba397293598f9fde56970e3d3f3381c734654e2.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json index 6b41f3dfe542d..10876144024fc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json @@ -109,7 +109,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1.zip" + "S3Key": "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707.zip" }, "Timeout": 900, "MemorySize": 128, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.assets.json index eb21019835974..c7ee35752b894 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.assets.json @@ -1,21 +1,21 @@ { "version": "32.0.0", "files": { - "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43": { + "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d": { "source": { - "path": "asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43", + "path": "asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d", "packaging": "zip" }, "destinations": { "current_account-us-east-2": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2", - "objectKey": "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43.zip", + "objectKey": "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d.zip", "region": "us-east-2", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-2" } } }, - "628bb48e7bd91d54b6ce92c0e7ca1bd95fc910b8875be69a0ab970a7fa6e596e": { + "6f003cd17557bc08eaa29932e763809c1541933c8845bc7b5342e750c1fd0581": { "source": { "path": "integ-https-redirect.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-2": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2", - "objectKey": "628bb48e7bd91d54b6ce92c0e7ca1bd95fc910b8875be69a0ab970a7fa6e596e.json", + "objectKey": "6f003cd17557bc08eaa29932e763809c1541933c8845bc7b5342e750c1fd0581.json", "region": "us-east-2", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-2" } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.template.json index 19308d7b3bd2c..7cceb0d002354 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.template.json @@ -99,8 +99,6 @@ "redirectRedirectAliasRecord700dc535A8D685": { "Type": "AWS::Route53::RecordSet", "Properties": { - "Name": "integ.example.com.", - "Type": "A", "AliasTarget": { "DNSName": { "Fn::GetAtt": [ @@ -118,14 +116,14 @@ ] } }, - "HostedZoneId": "Z23ABC4XYZL05B" + "HostedZoneId": "Z23ABC4XYZL05B", + "Name": "integ.example.com.", + "Type": "A" } }, "redirectRedirectAliasRecordSix700dc5B6BB8C6E": { "Type": "AWS::Route53::RecordSet", "Properties": { - "Name": "integ.example.com.", - "Type": "AAAA", "AliasTarget": { "DNSName": { "Fn::GetAtt": [ @@ -143,7 +141,9 @@ ] } }, - "HostedZoneId": "Z23ABC4XYZL05B" + "HostedZoneId": "Z23ABC4XYZL05B", + "Name": "integ.example.com.", + "Type": "AAAA" } }, "ExportsReader8B249524": { @@ -225,7 +225,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2" }, - "S3Key": "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43.zip" + "S3Key": "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d.zip" }, "Timeout": 900, "MemorySize": 128, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ.json index 8f701ed13d656..357f78f94e72e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ.json @@ -6,6 +6,7 @@ "stacks": [ "integ-https-redirect" ], + "diffAssets": true, "stackUpdateWorkflow": false, "assertionStack": "integ-test/DefaultTest/DeployAssert", "assertionStackName": "integtestDefaultTestDeployAssert24D5C536" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/manifest.json index 10bad00da1850..15b3fe177c419 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/manifest.json @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-2", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-2", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2/628bb48e7bd91d54b6ce92c0e7ca1bd95fc910b8875be69a0ab970a7fa6e596e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2/6f003cd17557bc08eaa29932e763809c1541933c8845bc7b5342e750c1fd0581.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -113,7 +113,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/e20e7104d895f82937f573dfabacaff07374e349c39f1b7cbdb8cef88c0d305c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/791d3baf8332708fce423c49cba397293598f9fde56970e3d3f3381c734654e2.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/tree.json index 5950e90b3037b..a5db0207d4e04 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/tree.json @@ -12,8 +12,8 @@ "id": "HostedZone", "path": "integ-https-redirect/HostedZone", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "redirect": { @@ -45,14 +45,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "RedirectDistribution": { @@ -140,14 +140,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_cloudfront.CloudFrontWebDistribution", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "RedirectAliasRecord700dc5": { @@ -160,8 +160,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { - "name": "integ.example.com.", - "type": "A", "aliasTarget": { "hostedZoneId": { "Fn::FindInMap": [ @@ -179,18 +177,20 @@ ] } }, - "hostedZoneId": "Z23ABC4XYZL05B" + "hostedZoneId": "Z23ABC4XYZL05B", + "name": "integ.example.com.", + "type": "A" } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.ARecord", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "RedirectAliasRecordSix700dc5": { @@ -203,8 +203,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { - "name": "integ.example.com.", - "type": "AAAA", "aliasTarget": { "hostedZoneId": { "Fn::FindInMap": [ @@ -222,32 +220,34 @@ ] } }, - "hostedZoneId": "Z23ABC4XYZL05B" + "hostedZoneId": "Z23ABC4XYZL05B", + "name": "integ.example.com.", + "type": "AAAA" } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.AaaaRecord", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53_patterns.HttpsRedirect", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "AWSCloudFrontPartitionHostedZoneIdMap": { "id": "AWSCloudFrontPartitionHostedZoneIdMap", "path": "integ-https-redirect/AWSCloudFrontPartitionHostedZoneIdMap", "constructInfo": { - "fqn": "aws-cdk-lib.CfnMapping", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "ExportsReader": { @@ -262,14 +262,14 @@ "id": "Default", "path": "integ-https-redirect/ExportsReader/Resource/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, @@ -286,52 +286,52 @@ "id": "Staging", "path": "integ-https-redirect/Custom::CrossRegionExportReaderCustomResourceProvider/Staging", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "Role": { "id": "Role", "path": "integ-https-redirect/Custom::CrossRegionExportReaderCustomResourceProvider/Role", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "Handler": { "id": "Handler", "path": "integ-https-redirect/Custom::CrossRegionExportReaderCustomResourceProvider/Handler", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResourceProvider", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "integ-https-redirect/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "integ-https-redirect/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61": { @@ -372,14 +372,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_certificatemanager.CfnCertificate", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_certificatemanager.Certificate", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "ExportsWriteruseast2828FA26B": { @@ -394,14 +394,14 @@ "id": "Default", "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/ExportsWriteruseast2828FA26B/Resource/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, @@ -418,52 +418,52 @@ "id": "Staging", "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/Custom::CrossRegionExportWriterCustomResourceProvider/Staging", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "Role": { "id": "Role", "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/Custom::CrossRegionExportWriterCustomResourceProvider/Role", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "Handler": { "id": "Handler", "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/Custom::CrossRegionExportWriterCustomResourceProvider/Handler", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResourceProvider", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "integ-test": { @@ -490,22 +490,22 @@ "id": "BootstrapVersion", "path": "integ-test/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "integ-test/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } }, @@ -530,8 +530,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.55" } } } \ No newline at end of file diff --git a/packages/aws-cdk-lib/core/lib/custom-resource-provider/cross-region-export-providers/cross-region-ssm-reader-handler/index.ts b/packages/aws-cdk-lib/core/lib/custom-resource-provider/cross-region-export-providers/cross-region-ssm-reader-handler/index.ts index 9c92ed5824332..cfa9c2bf4c1f0 100644 --- a/packages/aws-cdk-lib/core/lib/custom-resource-provider/cross-region-export-providers/cross-region-ssm-reader-handler/index.ts +++ b/packages/aws-cdk-lib/core/lib/custom-resource-provider/cross-region-export-providers/cross-region-ssm-reader-handler/index.ts @@ -1,6 +1,6 @@ /*eslint-disable no-console*/ /* eslint-disable import/no-extraneous-dependencies */ -import { SSM } from '@aws-sdk/client-ssm'; +import { InvalidResourceId, SSM } from '@aws-sdk/client-ssm'; import { ExportReaderCRProps, CrossRegionExports } from '../types'; export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent) { @@ -74,12 +74,10 @@ async function removeTags(ssm: SSM, parameters: string[], keyName: string): Prom ResourceId: name, }); } catch (e: any) { - switch (e.code) { - // if the parameter doesn't exist then there is nothing to release - case 'InvalidResourceId': - return; - default: - throw new Error(`Error releasing import ${name}: ${e}`); + if (e instanceof InvalidResourceId) { + return; + } else { + throw new Error(`Error releasing import ${name}: ${e}`); } } })); diff --git a/packages/aws-cdk-lib/core/test/custom-resource-provider/cross-region-ssm-reader-handler.test.ts b/packages/aws-cdk-lib/core/test/custom-resource-provider/cross-region-ssm-reader-handler.test.ts index 8b58409ec0356..bda462d28b0f5 100644 --- a/packages/aws-cdk-lib/core/test/custom-resource-provider/cross-region-ssm-reader-handler.test.ts +++ b/packages/aws-cdk-lib/core/test/custom-resource-provider/cross-region-ssm-reader-handler.test.ts @@ -1,13 +1,16 @@ +import { InvalidResourceId } from '@aws-sdk/client-ssm'; import { handler } from '../../lib/custom-resource-provider/cross-region-export-providers/cross-region-ssm-reader-handler'; import { SSM_EXPORT_PATH_PREFIX } from '../../lib/custom-resource-provider/cross-region-export-providers/types'; let mockDeleteParameters: jest.Mock ; let mockAddTagsToResource: jest.Mock; -let mockGetParametersByPath: jest.Mock; +let mockGetParametersByPath: jest.Mock = jest.fn(); let mockRemoveTagsFromResource: jest.Mock; jest.mock('@aws-sdk/client-ssm', () => { + const actual = jest.requireActual('@aws-sdk/client-ssm'); return { + ...actual, SSM: jest.fn().mockImplementation(() => ({ addTagsToResource: mockAddTagsToResource, removeTagsFromResource: mockRemoveTagsFromResource, @@ -190,6 +193,35 @@ describe('cross-region-ssm-reader entrypoint', () => { TagKeys: ['aws-cdk:strong-ref:MyStack'], }); }); + + test('Does not throw when parameters do not exit', async () => { + // GIVEN + const event = makeEvent({ + RequestType: 'Delete', + ResourceProperties: { + ServiceToken: '', + ReaderProps: { + region: 'us-east-1', + prefix: 'MyStack', + imports: { + '/cdk/exports/MyStack/RemovedExport': 'abc', + }, + }, + }, + }); + + // WHEN + mockGetParametersByPath.mockRejectedValue(new InvalidResourceId({ message: 'Error Message', $metadata: {} })); + await handler(event); + + // THEN + expect(mockRemoveTagsFromResource).toHaveBeenCalledTimes(1); + expect(mockRemoveTagsFromResource).toHaveBeenCalledWith({ + ResourceType: 'Parameter', + ResourceId: '/cdk/exports/MyStack/RemovedExport', + TagKeys: ['aws-cdk:strong-ref:MyStack'], + }); + }); }); function makeEvent(req: Partial): AWSLambda.CloudFormationCustomResourceEvent {