Hello All,
We use cloudformation to create ECS cluster, but it is always failed when we try to delete cloudformation stack due to ECS cluster cannot be deleted successfully.
The error message as below:
Resource handler returned message: "Error occurred during operation 'DeleteClusters SDK Error: The Cluster cannot be deleted while Container Instances are active or draining. (Service: AmazonECS; Status Code: 400; Error Code: ClusterContainsContainerInstancesException; Request ID: ecea3cfb-38b7-4d1a-8af5-a11e22999428; Proxy: null)'." (RequestToken: deb1c362-8ee2-7734-28a2-bb306f9f31f3, HandlerErrorCode: GeneralServiceException)
According to error message, the failure reason is "Container Instances are active or draining", so ECS cluster cannot be deleted.
Is there any way to make cloudformation stack can be deleted successfully, for example: force to delete ECS cluster or wait for ECS cluster deleted.
Thanks,
Mingtong
Is there any way to make ecs cluster be deleted by cloudformation, not other additional cli?