Route 53 Health Check Suboptimal
route53-health-check-suboptimal
What this rule checks
Detects Route 53 health checks using HTTP instead of HTTPS or the standard request interval.
How to fix it
- 1Use HTTPS to validate certificate and endpoint security
- 2Use a 10-second request interval for critical endpoints
import * as route53 from 'aws-cdk-lib/aws-route53';
new route53.CfnHealthCheck(this, 'Hc', {
healthCheckConfig: { type: 'HTTP', fullyQualifiedDomainName: 'example.com', port: 80 },
});import * as route53 from 'aws-cdk-lib/aws-route53';
new route53.CfnHealthCheck(this, 'Hc', {
healthCheckConfig: { type: 'HTTPS', fullyQualifiedDomainName: 'example.com', port: 443, requestInterval: 10 },
});CDK Insights pinpoints the exact file and line in your CDK source for every finding, so you can jump straight to the fix.
Affected resource types
AWS::Route53::HealthCheckIntentional? Suppress this finding
Sometimes a flag is deliberate β a genuinely public endpoint, say. You can dismiss route53-health-check-suboptimal and the reason is kept in the report, not silently hidden.
In .cdk-insights.json:
{
"ignoreRules": [
{ "id": "route53-health-check-suboptimal", "reason": "Why this is intentional" }
]
}Or inline in your CDK code:
Validations.of(scope).acknowledge({
id: 'cdk-insights::route53-health-check-suboptimal',
reason: 'Why this is intentional',
});Use the rule ID route53-health-check-suboptimal shown above β not the CDK-* ID from SARIF / GitHub code scanning. To dismiss every finding on one construct instead, use ignorePaths. Suppression docs β
Catch this in your stack
$ npx cdk-insights scanCDK Insights runs this and 118+ other rules locally against your synthesised CDK app β free, no account, your code never leaves your machine.