Search code examples
amazon-web-servicesamazon-ec2aws-ecsaws-batch

How is a batch processing system in AWS ECS different from AWS Batch?


I have a batch processing system which runs for 5 hours daily on a fixed time. With AWS Batch, I could schedule the job which creates the required EC2 instances to do the job and terminate back the instances.But with ECS, can i launch and terminate the EC2 instance automatically as per my requirement?


Solution

  • This automatic downscaling can be done using AWS Batch as long as you create the Compute Environment as a Managed Compute Environment instead of unmanaged.

    However, using Tasks in ECS means the EC2 resources must be cleaned up and deleted manually. It can be built in to part of your application or managed with CloudFormation, but scaling down those resources is going to be your responsibility in the end.