title: AWS - Seemingly random 502 errors only on some endpoints
body: <p>We are facing random 502 errors from cloudfront on different endpoints/behaviors. The endpoint is connected to a EC2 instance which have 4 cores and 16gb ram. It gives 502 randomly and the same REST call works on random restarts.
  Some of the distribution settings:</p>
  <p>Price Class: Use All Edge Locations (Best Performance)
  Security Policy : TLSv1.1_2016
  HTTP versions: to HTTP/2, HTTP/1.1, HTTP/1.0.
  Custom SSL Client Support: Clients that Support Server Name Indication (SNI) - (Recommended)</p>
  <p>We have around 45 behaviors all connected to different origins or origin group.</p>