Amazon AWS ECS Task delay


I’m using to Run Task on AWS ECS for batch tasks.

Sometimes it takes 10 seconds for the task to be on pending start and move to running status and sometimes it can take 5 minutes to start running
between pending status to start running.

What can i do in order to prevent the 5 minutes delay issues?
Is there some settings or kind of “warm up” procedures?


The delay is due to your task starting on a container instance that doesn’t have your base image already downloaded. There are a few things you can do to help with this:

  1. Pre-load your instances by starting n number of tasks simultaneously, where n is the number of instances you have in your cluster. This will download your images onto each container instance, which will drastically improve the start times of subsequent tasks.
  2. Improve the networking throughput of your instances, by upgrading to larger instances with higher throughput. You can see a breakdown of each instance type on the ‘Amazon EC2 Instance Configuration’ page. You need to weigh up the increased cost against the delay.
  3. Reduce your image size.

Leave a Reply