I have an Elastic Beanstalk application that is running a wordpress application, and I would like some monitoring and scaling triggers for when the health check, the homepage, returns an HTTP response code within the range of
4xx and 5xx. I am aware of monitoring tab and the capacity tab from the configuration section in Elastic Beanstalk. I see scaling rules and a health check field there. Here is the environment behavior that I am looking for:
Scaling triggers - Health check -- which is the [home page] (/index.php) -- returns a response status code within 4xx and 5xx - spin up a new instance behind the Elastic Load Balancer which will handle web traffic - in the meantime direct all traffic to the maintenance page - If over a period of 3 minutes no instance is returning a health check response within 4xx and 5xx from the home page - either scale down to two instances or keep the two "healthy" instances in rotation behind the ELB.
Will I need to use the tabs (monitoring and capacity) that I mentioned above? Can someone tell me set up the above environment triggers in AWS Elastic Beanstalk?