AWS automatically keep on creating ECS instance.

Did you create the instance thru Elastic Beanstalk? Chances are ELB, or an autoscaling policy is interpreting your instance being shutdown as a crash, so its creating a new one to replace it, i.e. doing what it is supposed to do.

Make sure any autoscale policies you have in place are also turned off.


In my case it was the autoscalling policy and as I am pretty new to AWS from GCP it was a bit of a doozy to find.

On the EC2 console page just scroll down on the left to the Auto Scaling or: https://console.aws.amazon.com/ec2/autoscaling/home?region=us-east-1#AutoScalingGroups:


Deregister container instances and delete cluster. Click the "x" of the cluster you want to delete. It will stop creating a new instance automatically. Regards, Thirumal Peesari