Skip to content

Commit d730f7f

Browse files
authored
fix(route53): timeouts due to delete-existing-record-set-handler's wait time (#27068)
This PR updates the wait time of the `delete-existing-record-set-handler` from 60 to 1800 seconds. Commit 399b6bb upgraded the handler to use the AWS SDK V3 (was V2) and made the following change: ``` - await route53.waitFor('resourceRecordSetsChanged', { Id: changeResourceRecordSets.ChangeInfo.Id }).promise(); + await waitUntilResourceRecordSetsChanged({ client: route53, maxWaitTime: 60 }, { Id: changeResourceRecordSets?.ChangeInfo?.Id }) ``` The V2 `route53.waitFor` waits for 1800 seconds (see [reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Route53.html#waitFor-property)) > `Waits for the resourceRecordSetsChanged state by periodically calling the underlying [Route53.getChange()](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Route53.html#getChange-property) operation every 30 seconds (at most 60 times).` The new explicit configuration was set to 60 seconds which is too short and caused timeouts and failure in our cloudformation stacks Supersedes and closes #27060 Co-authored-by: Tom Roshko [[email protected]](mailto:[email protected]) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 70d9bf7 commit d730f7f

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed
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/test/integ.delete-existing-record-set.js.snapshot/cdk-route53-integ-delete-existing-record-set.assets.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"version": "34.0.0",
33
"files": {
4-
"b3a6a7ffec7a4baf8647b80c08ebb1b91986d1beedfead0945b9de4b5ac368b6": {
4+
"482643dcf7106ecdc7f4ff9aefba13d1e5c7265377e6c6b9c77245f2bc55f6ef": {
55
"source": {
6-
"path": "asset.b3a6a7ffec7a4baf8647b80c08ebb1b91986d1beedfead0945b9de4b5ac368b6",
6+
"path": "asset.482643dcf7106ecdc7f4ff9aefba13d1e5c7265377e6c6b9c77245f2bc55f6ef",
77
"packaging": "zip"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "b3a6a7ffec7a4baf8647b80c08ebb1b91986d1beedfead0945b9de4b5ac368b6.zip",
12+
"objectKey": "482643dcf7106ecdc7f4ff9aefba13d1e5c7265377e6c6b9c77245f2bc55f6ef.zip",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}
1616
},
17-
"30e7342ae8e084b153ef62f76086d417df5f1382d2d7738cea15913e165a0f69": {
17+
"57446ecbb9974f64369e24dcd15c9ee996690ec25e80aa5a3e44a695645f3ea5": {
1818
"source": {
1919
"path": "cdk-route53-integ-delete-existing-record-set.template.json",
2020
"packaging": "file"
2121
},
2222
"destinations": {
2323
"current_account-current_region": {
2424
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25-
"objectKey": "30e7342ae8e084b153ef62f76086d417df5f1382d2d7738cea15913e165a0f69.json",
25+
"objectKey": "57446ecbb9974f64369e24dcd15c9ee996690ec25e80aa5a3e44a695645f3ea5.json",
2626
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
2727
}
2828
}

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk-route53-integ-delete-existing-record-set.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
"S3Bucket": {
152152
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
153153
},
154-
"S3Key": "b3a6a7ffec7a4baf8647b80c08ebb1b91986d1beedfead0945b9de4b5ac368b6.zip"
154+
"S3Key": "482643dcf7106ecdc7f4ff9aefba13d1e5c7265377e6c6b9c77245f2bc55f6ef.zip"
155155
},
156156
"Timeout": 900,
157157
"MemorySize": 128,

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/manifest.json

+1-1
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}-${AWS::Region}",
1919
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
20-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/30e7342ae8e084b153ef62f76086d417df5f1382d2d7738cea15913e165a0f69.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/57446ecbb9974f64369e24dcd15c9ee996690ec25e80aa5a3e44a695645f3ea5.json",
2121
"requiresBootstrapStackVersion": 6,
2222
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2323
"additionalDependencies": [

packages/aws-cdk-lib/aws-route53/lib/delete-existing-record-set-handler/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent
4646
},
4747
});
4848

49-
await waitUntilResourceRecordSetsChanged({ client: route53, maxWaitTime: 60 }, { Id: changeResourceRecordSets?.ChangeInfo?.Id });
49+
await waitUntilResourceRecordSetsChanged({ client: route53, maxWaitTime: 890 }, { Id: changeResourceRecordSets?.ChangeInfo?.Id });
5050

5151
return {
5252
PhysicalResourceId: `${existingRecord.Name}-${existingRecord.Type}`,

0 commit comments

Comments
 (0)