(aws-route53): cannot create HealthCheck with recovery control type #34262
Labels
@aws-cdk/aws-route53
Related to Amazon Route 53
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
Deployment of Route53 health check of type "Recovery Control" used in Application Recovery Controller fails with the following message:
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
When the HealthCheck type is Recovery Control, it is expected that unnecessary properties should not be included in the
HealthCheckConfig
property ofAWS::Route53::HealthCheck
in the CloudFormation template generated from CDK code.Current Behavior
When the HealthCheck type is Recovery Control, properties such as
FailureThreshold
,RequestInterval
, andMeasureLatency
are output to the CloudFormation template with default values, even though they are not explicitly specified in the CDK code.Reproduction Steps
It can be reproduced with the following code:
Possible Solution
In health-check.ts, if HealthCheck type is Recovery Control, return
undefined
as default value for previous 3 properties (FailureThreshold
,RequestInterval
, andMeasureLatency
).The following codes will need to be modified to return
undefined
when health check type isRECOVERY_CONTROL
:aws-cdk/packages/aws-cdk-lib/aws-route53/lib/health-check.ts
Lines 331 to 339 in 7f378b6
aws-cdk/packages/aws-cdk-lib/aws-route53/lib/health-check.ts
Lines 341 to 349 in 7f378b6
aws-cdk/packages/aws-cdk-lib/aws-route53/lib/health-check.ts
Lines 313 to 321 in 7f378b6
Additional Information/Context
Currently this problem can be avoided with an escape hatches as follows.
CDK CLI Version
2.1012.0 (build e4c1f15) / aws-cdk-lib: 2.190.0
Framework Version
No response
Node.js Version
v22.14.0
OS
macOS 15.4
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: