Skip to content

Commit

Permalink
fix(core): cross region exports fail when parameter doesn't exist (#2…
Browse files Browse the repository at this point in the history
…6434)

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*
  • Loading branch information
corymhall authored Jul 19, 2023
1 parent e8fc7a8 commit d130bd7
Show file tree
Hide file tree
Showing 22 changed files with 161 additions and 131 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"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"
},
"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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"Properties": {
"Code": {
"S3Bucket": "cdk-hnb659fds-assets-12345678-us-east-1",
"S3Key": "a60fdad7a8c0f3b134ee34463d66db2443c77d0adb4d3e603e1267c11b3df6e1.zip"
"S3Key": "dac9e4b5d47d964a6d6c14b583ec7968bd6307d1d73c20e9327c303a18a3a707.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"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"
},
"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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"Properties": {
"Code": {
"S3Bucket": "cdk-hnb659fds-assets-12345678-us-east-2",
"S3Key": "214c0a1c55832d2c26686c93062b90cfd4031cef0e1b5964eb2117b1dae7bb43.zip"
"S3Key": "09d97dcfcef5cdc7c214c4d1d2176add2c61f9f511990346a8cec8f4b8cb587d.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"stacks": [
"integ-cloudfront-stack"
],
"diffAssets": false,
"diffAssets": true,
"assertionStack": "integ-cloudfront-cross-region-acm/DefaultTest/DeployAssert",
"assertionStackName": "integcloudfrontcrossregionacmDefaultTestDeployAssertD48673AA"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"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"
},
"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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"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"
},
"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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@
"redirectRedirectAliasRecord700dc535A8D685": {
"Type": "AWS::Route53::RecordSet",
"Properties": {
"Name": "integ.example.com.",
"Type": "A",
"AliasTarget": {
"DNSName": {
"Fn::GetAtt": [
Expand All @@ -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": [
Expand All @@ -143,7 +141,9 @@
]
}
},
"HostedZoneId": "Z23ABC4XYZL05B"
"HostedZoneId": "Z23ABC4XYZL05B",
"Name": "integ.example.com.",
"Type": "AAAA"
}
},
"ExportsReader8B249524": {
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"stacks": [
"integ-https-redirect"
],
"diffAssets": true,
"stackUpdateWorkflow": false,
"assertionStack": "integ-test/DefaultTest/DeployAssert",
"assertionStackName": "integtestDefaultTestDeployAssert24D5C536"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down
Loading

0 comments on commit d130bd7

Please sign in to comment.