'AWS changes automatically desired capacity

I am creating an ECS system where I want to have an autoscaling group managed by a capacity provider in a cluster.

Right now I have created the autoscaling group and associate it with the capacity provider. However I have a strange problem. In my autoscaling group I put desired:1, min:0, max:3, but suddenly the autoscales starts to grow. First, because the desired changes automatically to 2. Then, once it created it it changes to 3 and I end up with 3 instances even I am not running anything yet in those instances. How do I solve this? The only way it doesn't change the desired is by putting 0, where if I remove all the instances it won't init them again.

Note: I haven't associated yet tasks or services to the cluster.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source