Interview Prep/AWS/Route 53, CloudFront, API Gateway and Messaging

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 →

  1. Allow the ROUTE53_HEALTHCHECKS ranges (or the managed prefix list com.amazonaws.route53-healthchecks where available) on the port
  2. Set FullyQualifiedDomainName and EnableSNI for HTTPS checks

Prevent → For private resources, use CloudWatch alarm-based (calculated) health checks, because Route 53 checkers cannot reach private IPs.

aws All AWS questions Roadmap: AWS core services

More on Route 53, CloudFront, API Gateway and Messaging