I'm trying to delete a stack create using AWS Cloud Formation. However, the AWS is not showing the error cause and can't (apparently) do anything to resolve it by myself.
I think my mistake was a typo on the Cloud Formation file and the AWS can't recover it. Instead of use this notation to the ClusterName:
Service:
Type: AWS::ECS::Service
Properties:
ServiceName: !Ref 'ServiceName'
Cluster:
!Ref ClusterName
I added a -:
Service:
Type: AWS::ECS::Service
Properties:
ServiceName: !Ref 'ServiceName'
Cluster:
- !Ref ClusterName
The probably result of this was a CREATE_FAILED with the Status Reason Internal Failure when creating the Service.
When I try to delete it, the status is DELETE_FAILED with the same Status Reason: Internal Failure. I can't fix this typo because I can't make a new changeset on the Cloud Formation with the status DELETE FAILED.
When the AWS show the option for "resources to retain", to skip the problematic resource, the list of options is empty:
I tried to "force" the retain resources, but I receive the same error on AWS:
aws cloudformation delete-stack --stack-name service-name --retain-resources Service
The described Service result, using the follow command:
aws cloudformation describe-stack-resource --stack-name service-name --logical-resource-id Service
Is:
{
"StackResourceDetail": {
"StackName": "service-name",
"StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/service-name/a1b35890-41d5-13eb-c129-0er5kko75597",
"LogicalResourceId": "Service",
"ResourceType": "AWS::ECS::Service",
"LastUpdatedTimestamp": "2020-09-27T12:00:06.175000+00:00",
"ResourceStatus": "CREATE_FAILED",
"ResourceStatusReason": "Internal Failure",
"Metadata": "{}",
"DriftInformation": {
"StackResourceDriftStatus": "NOT_CHECKED"
}
}
}
What are my options now?
