title: How to fail an AWS ECS task when a non essential container fails to start
body: <p>I have an ECS task that consists of three containers:</p>
  
  <ol>
  <li>S3-pull. This container pulls data from S3</li>
  <li>Computation. This container performs a computation on data pulled by S3-pull. Depends on S3-pull success, i.e. completing with exit code 0.</li>
  <li>S3-push. This container copies result of the Computation container to another S3 bucket. Depends on Computation success and is marked as essential.</li>
  </ol>
  
  <p>The problem is that if either S3-pull or Computation container fails to start, for example because of misconfiguration like pointing to a wrong log group, then the ECS task does not fail but is stuck in limbo until it hits the time out. At the same time I can not mark S3-pull and Computation containers as essential because an essential container can not have other containers depending on it. So is there a way to fail the whole task once one of its non essential containers has failed to start and not wait until time out?</p>