Elastic Beanstalk disable health state change based on 4xx responses
<p>I have a rest api running on Elastic Beanstalk, which works great. Everything application-wise is running good, and working as expected.</p>

<p>The application is a rest api, used to lookup different users.</p>

<pre><code>example url: http://service.com/user?uid=xxxx&amp;anotherid=xxxx
</code></pre>

<p>If a user with either id's is found, the api responds with <code>200 OK</code>, if not, responds with <code>404 Not Found</code> as per. <code>HTTP/1.1</code> status code defenitions.</p>

<p>It is not uncommon for our api to answer <code>404 Not Found</code> on a lot of requests, and  the elastic beanstalk transfers our environment from <code>OK</code> into <code>Warning</code> or even into <code>Degraded</code> because of this. And it looks like <code>nginx</code> has refused connection to the application because of this degraded state. (looks like it has a threshold of 30%+ into <code>warning</code>and 50%+ into <code>degraded</code> states. This is a problem, because the application is actually working as expected, but Elastic Beanstalks default settings <em>thinks</em> it is a problem, when it's really not.</p>

<p>Does anyone know of a way to edit the threshold of the 4xx warnings and state transitions in EB, or completely disable them?</p>

<p>Or should i really do a symptom-treatment and stop using <code>404 Not Found</code> on a call like this? (i really do not like this option)</p>