title: AWS ECS Task Memory Hard and Soft Limits
body: <p>I'm confused about the purpose of having both hard and soft memory limits for ECS task definitions.</p>
  
  <p>IIRC the soft limit is how much memory the scheduler reserves on an instance for the task to run, and the hard limit is how much memory a container can use before it is murdered. </p>
  
  <p>My issue is that if the ECS scheduler allocates tasks to instances based on the soft limit, you could have a situation where a task that is using memory above the soft limit but below the hard limit could cause the instance to exceed its max memory (assuming all other tasks are using memory slightly below or equal to their soft limit). </p>
  
  <p>Is this correct?</p>
  
  <p>Thanks</p>