Search code examples
amazon-web-servicesamazon-ecsautoscaling

aws ecs autoscaling instances


Currently I am struggling with AWS auto scaling.

Do I need to create instance Auto Scaling Group in parallel to ECS Service Auto Scaling to provision necessary resources for services/tasks, or it is managed automatically by the latter one?

edit:
I am using api/cloudformation only, no web interface.


Solution

  • ECS service scaling and And EC2 instance scaling are independent entities. EC2 instance scaling is not handled if you configure ECS service scaling. It is required(Mandotory) to configure EC2 Instance scaling and maintain enough resources in the cluster if you are opting ECS Service scaling, otherwise ECS service fails to place new Tasks during service scaling activities. In general, it is recommended to scale EC2 Instances based on CPUReservation and MemoryReservation cloudwatch alarms.

    EC2 Container Instance scaling tutorial: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch_alarm_autoscaling.html