Disable AWS ELB health check

amazon-elbamazon-web-serviceshealthcheck

Is there a way to disable AWS ELB's health check completely? I use a logger middleware (morgan) to log all requests and it's quite annoying for health check requests to get logged every 5min.

Best Answer

Rather than disabling it completely, have your webserver serve a static HTML page (thus bypassing node entirely) and check that URL. Alternatively, morgan appears to have a skip function you can use to exempt certain requests from logging - the ELB sends a particular HTTP user agent string (ELB-HealthChecker/1.0, I'd ignore the version number though) you can look for.