I'm using AWS Load Balancer with 3 EC2 servers, and I'm trying to serve a Maintenance page when the site is under maintenance.
This page needs to return 503 HTTP code because it is a proper code for a maintenance mode and will prevent possible problems with SEO.
When I return 503 code from any of my servers, Load Balancer makes it "Not In Service", and when all servers return 503, the website returns a blank page (because all servers are disconnected).
My questions are:
1) Is there any way to serve a custom static page with a message for visitors from Load balancer if there are no healthy servers?
2) Or how to configure Load Balancer's Health Check that it will not consider 503 as a reason to mark the server as "unhealthy"?