Skip to content

Commit d130bd7

Browse files
authored
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*
1 parent e8fc7a8 commit d130bd7

File tree

22 files changed

+161
-131
lines changed

22 files changed

+161
-131
lines changed
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-acm-stack.assets.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
22
"version": "32.0.0",
33
"files": {
4-
"a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1": {
4+
"dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707": {
55
"source": {
6-
"path": "asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1",
6+
"path": "asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707",
77
"packaging": "zip"
88
},
99
"destinations": {
1010
"12345678-us-east-1": {
1111
"bucketName": "cdk-hnb659fds-assets-12345678-us-east-1",
12-
"objectKey": "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1.zip",
12+
"objectKey": "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707.zip",
1313
"region": "us-east-1",
1414
"assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-us-east-1"
1515
}
1616
}
1717
},
18-
"06ebf41a5e3b2f5b37553cd7bd38b7293f0f3fd1224562144b6ae4da7cd9507f": {
18+
"4b7e1b4f4a5deee38294099c4a003b61c29ecb742f56bf99436b39b72a7bf306": {
1919
"source": {
2020
"path": "integ-acm-stack.template.json",
2121
"packaging": "file"
2222
},
2323
"destinations": {
2424
"12345678-us-east-1": {
2525
"bucketName": "cdk-hnb659fds-assets-12345678-us-east-1",
26-
"objectKey": "06ebf41a5e3b2f5b37553cd7bd38b7293f0f3fd1224562144b6ae4da7cd9507f.json",
26+
"objectKey": "4b7e1b4f4a5deee38294099c4a003b61c29ecb742f56bf99436b39b72a7bf306.json",
2727
"region": "us-east-1",
2828
"assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-us-east-1"
2929
}

packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-acm-stack.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"Properties": {
9090
"Code": {
9191
"S3Bucket": "cdk-hnb659fds-assets-12345678-us-east-1",
92-
"S3Key": "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1.zip"
92+
"S3Key": "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707.zip"
9393
},
9494
"Timeout": 900,
9595
"MemorySize": 128,

packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-cloudfront-stack.assets.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
22
"version": "32.0.0",
33
"files": {
4-
"214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43": {
4+
"09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d": {
55
"source": {
6-
"path": "asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43",
6+
"path": "asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d",
77
"packaging": "zip"
88
},
99
"destinations": {
1010
"12345678-us-east-2": {
1111
"bucketName": "cdk-hnb659fds-assets-12345678-us-east-2",
12-
"objectKey": "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43.zip",
12+
"objectKey": "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d.zip",
1313
"region": "us-east-2",
1414
"assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-us-east-2"
1515
}
1616
}
1717
},
18-
"36037c7546d57106e4e45e3cf67becfa56671ba0b756e3babc4835933ea854ca": {
18+
"8bf7005bb92668630dede945c73a8aaf5d15697928c0ac998f5f62c7b36c0116": {
1919
"source": {
2020
"path": "integ-cloudfront-stack.template.json",
2121
"packaging": "file"
2222
},
2323
"destinations": {
2424
"12345678-us-east-2": {
2525
"bucketName": "cdk-hnb659fds-assets-12345678-us-east-2",
26-
"objectKey": "36037c7546d57106e4e45e3cf67becfa56671ba0b756e3babc4835933ea854ca.json",
26+
"objectKey": "8bf7005bb92668630dede945c73a8aaf5d15697928c0ac998f5f62c7b36c0116.json",
2727
"region": "us-east-2",
2828
"assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-us-east-2"
2929
}

packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ-cloudfront-stack.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"Properties": {
105105
"Code": {
106106
"S3Bucket": "cdk-hnb659fds-assets-12345678-us-east-2",
107-
"S3Key": "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43.zip"
107+
"S3Key": "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d.zip"
108108
},
109109
"Timeout": 900,
110110
"MemorySize": 128,

packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/integ.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"stacks": [
77
"integ-cloudfront-stack"
88
],
9-
"diffAssets": false,
9+
"diffAssets": true,
1010
"assertionStack": "integ-cloudfront-cross-region-acm/DefaultTest/DeployAssert",
1111
"assertionStackName": "integcloudfrontcrossregionacmDefaultTestDeployAssertD48673AA"
1212
}

packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.js.snapshot/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"validateOnSynth": false,
1818
"assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-deploy-role-12345678-us-east-1",
1919
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-cfn-exec-role-12345678-us-east-1",
20-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-us-east-1/06ebf41a5e3b2f5b37553cd7bd38b7293f0f3fd1224562144b6ae4da7cd9507f.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-us-east-1/4b7e1b4f4a5deee38294099c4a003b61c29ecb742f56bf99436b39b72a7bf306.json",
2121
"requiresBootstrapStackVersion": 6,
2222
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2323
"additionalDependencies": [
@@ -88,7 +88,7 @@
8888
"validateOnSynth": false,
8989
"assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-deploy-role-12345678-us-east-2",
9090
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-cfn-exec-role-12345678-us-east-2",
91-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-us-east-2/36037c7546d57106e4e45e3cf67becfa56671ba0b756e3babc4835933ea854ca.json",
91+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-us-east-2/8bf7005bb92668630dede945c73a8aaf5d15697928c0ac998f5f62c7b36c0116.json",
9292
"requiresBootstrapStackVersion": 6,
9393
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
9494
"additionalDependencies": [

packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.cloudfront-cross-region-cert.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ new cloudfront.Distribution(cloudFrontStack, 'Distro', {
5050

5151
new IntegTest(app, 'integ-cloudfront-cross-region-acm', {
5252
testCases: [cloudFrontStack],
53-
diffAssets: false,
53+
diffAssets: true,
5454
enableLookups: true,
5555
});
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
22
"version": "32.0.0",
33
"files": {
4-
"a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1": {
4+
"dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707": {
55
"source": {
6-
"path": "asset.a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1",
6+
"path": "asset.dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707",
77
"packaging": "zip"
88
},
99
"destinations": {
1010
"current_account-us-east-1": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1",
12-
"objectKey": "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1.zip",
12+
"objectKey": "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707.zip",
1313
"region": "us-east-1",
1414
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1"
1515
}
1616
}
1717
},
18-
"e20e7104d895f82937f573dfabacaff07374e349c39f1b7cbdb8cef88c0d305c": {
18+
"791d3baf8332708fce423c49cba397293598f9fde56970e3d3f3381c734654e2": {
1919
"source": {
2020
"path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json",
2121
"packaging": "file"
2222
},
2323
"destinations": {
2424
"current_account-us-east-1": {
2525
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1",
26-
"objectKey": "e20e7104d895f82937f573dfabacaff07374e349c39f1b7cbdb8cef88c0d305c.json",
26+
"objectKey": "791d3baf8332708fce423c49cba397293598f9fde56970e3d3f3381c734654e2.json",
2727
"region": "us-east-1",
2828
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1"
2929
}

packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"S3Bucket": {
110110
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1"
111111
},
112-
"S3Key": "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1.zip"
112+
"S3Key": "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707.zip"
113113
},
114114
"Timeout": 900,
115115
"MemorySize": 128,

packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.assets.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
22
"version": "32.0.0",
33
"files": {
4-
"214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43": {
4+
"09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d": {
55
"source": {
6-
"path": "asset.214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43",
6+
"path": "asset.09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d",
77
"packaging": "zip"
88
},
99
"destinations": {
1010
"current_account-us-east-2": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2",
12-
"objectKey": "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43.zip",
12+
"objectKey": "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d.zip",
1313
"region": "us-east-2",
1414
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-2"
1515
}
1616
}
1717
},
18-
"628bb48e7bd91d54b6ce92c0e7ca1bd95fc910b8875be69a0ab970a7fa6e596e": {
18+
"6f003cd17557bc08eaa29932e763809c1541933c8845bc7b5342e750c1fd0581": {
1919
"source": {
2020
"path": "integ-https-redirect.template.json",
2121
"packaging": "file"
2222
},
2323
"destinations": {
2424
"current_account-us-east-2": {
2525
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2",
26-
"objectKey": "628bb48e7bd91d54b6ce92c0e7ca1bd95fc910b8875be69a0ab970a7fa6e596e.json",
26+
"objectKey": "6f003cd17557bc08eaa29932e763809c1541933c8845bc7b5342e750c1fd0581.json",
2727
"region": "us-east-2",
2828
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-2"
2929
}

packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.template.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@
9999
"redirectRedirectAliasRecord700dc535A8D685": {
100100
"Type": "AWS::Route53::RecordSet",
101101
"Properties": {
102-
"Name": "integ.example.com.",
103-
"Type": "A",
104102
"AliasTarget": {
105103
"DNSName": {
106104
"Fn::GetAtt": [
@@ -118,14 +116,14 @@
118116
]
119117
}
120118
},
121-
"HostedZoneId": "Z23ABC4XYZL05B"
119+
"HostedZoneId": "Z23ABC4XYZL05B",
120+
"Name": "integ.example.com.",
121+
"Type": "A"
122122
}
123123
},
124124
"redirectRedirectAliasRecordSix700dc5B6BB8C6E": {
125125
"Type": "AWS::Route53::RecordSet",
126126
"Properties": {
127-
"Name": "integ.example.com.",
128-
"Type": "AAAA",
129127
"AliasTarget": {
130128
"DNSName": {
131129
"Fn::GetAtt": [
@@ -143,7 +141,9 @@
143141
]
144142
}
145143
},
146-
"HostedZoneId": "Z23ABC4XYZL05B"
144+
"HostedZoneId": "Z23ABC4XYZL05B",
145+
"Name": "integ.example.com.",
146+
"Type": "AAAA"
147147
}
148148
},
149149
"ExportsReader8B249524": {
@@ -225,7 +225,7 @@
225225
"S3Bucket": {
226226
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2"
227227
},
228-
"S3Key": "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43.zip"
228+
"S3Key": "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d.zip"
229229
},
230230
"Timeout": 900,
231231
"MemorySize": 128,

packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"stacks": [
77
"integ-https-redirect"
88
],
9+
"diffAssets": true,
910
"stackUpdateWorkflow": false,
1011
"assertionStack": "integ-test/DefaultTest/DeployAssert",
1112
"assertionStackName": "integtestDefaultTestDeployAssert24D5C536"

packages/@aws-cdk-testing/framework-integ/test/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"validateOnSynth": false,
1818
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-2",
1919
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-2",
20-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2/628bb48e7bd91d54b6ce92c0e7ca1bd95fc910b8875be69a0ab970a7fa6e596e.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2/6f003cd17557bc08eaa29932e763809c1541933c8845bc7b5342e750c1fd0581.json",
2121
"requiresBootstrapStackVersion": 6,
2222
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2323
"additionalDependencies": [
@@ -113,7 +113,7 @@
113113
"validateOnSynth": false,
114114
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1",
115115
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1",
116-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/e20e7104d895f82937f573dfabacaff07374e349c39f1b7cbdb8cef88c0d305c.json",
116+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/791d3baf8332708fce423c49cba397293598f9fde56970e3d3f3381c734654e2.json",
117117
"requiresBootstrapStackVersion": 6,
118118
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
119119
"additionalDependencies": [

0 commit comments

Comments
 (0)