A Route 53 health check reports `Failure: Connection timed out` for an endpoint that works fine from your laptop.
IntermediateTroubleshootingRoute 53, CloudFront, API Gateway and Messaging
Answer
Likely causes → The SG, NACL or WAF does not allow the Route 53 health checker IP ranges. Other causes: the check uses HTTP while only HTTPS is open, or the host header or SNI is wrong.
Diagnose →
aws route53 get-health-check --health-check-id <id> --query 'HealthCheck.HealthCheckConfig'
aws route53 get-health-check-last-failure-reason --health-check-id <id>
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[]|select(.service=="ROUTE53_HEALTHCHECKS").ip_prefix' | head
Fix →
- Allow the
ROUTE53_HEALTHCHECKSranges (or the managed prefix listcom.amazonaws.route53-healthcheckswhere available) on the port - Set
FullyQualifiedDomainNameandEnableSNIfor HTTPS checks
Prevent → For private resources, use CloudWatch alarm-based (calculated) health checks, because Route 53 checkers cannot reach private IPs.
More on Route 53, CloudFront, API Gateway and Messaging
You created a public hosted zone and records for `example.com`, but `dig example.com` returns `NXDOMAIN` or old records.Beginner`InvalidChangeBatch: RRSet of type CNAME with DNS name example.com. is not permitted at apex in zone example.com.`BeginnerThe primary Region is down, but Route 53 failover records still send traffic to it.IntermediateYou changed an A record an hour ago, but some users still reach the old server, and a newly created name returned `NXDOMAIN` for a while.AdvancedCloudFront returns `403 AccessDenied` (S3 XML) for every object after you switched the S3 origin to Origin Access Control.IntermediateCloudFront shows `502 ERROR. The request could not be satisfied. CloudFront wasn't able to connect to the origin.`Intermediate