- Newest
- Most votes
- Most comments
Have you tried removing it from the CFN template and then update the stack with modified template?
There should be no way to create a CloudWatch log group with an asterisk in the name. It's stated in the API documentation for logs:CreateLogGroup, https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateLogGroup.html, which specifies that the log group name must match the regular expression pattern [\.\-_/#A-Za-z0-9]+ that doesn't permit asterisks.
If you're sure your log group actually has an asterisk in its name, I suggest you raise a support ticket under the billing topic, saying that you're unable to delete a billable resource due to an apparent bug in an AWS API. Mention that the asterisk in the name shouldn't be possible to be there, and include the above documentation link to prove it. AWS Support should be able to get the log group deleted for you.
If the CloudFormation stack is in a rollback failed status, the stack may not be possible to recover. I also believe support won't be able to fix it for you, nor would it be included in basic support. Your best bet may be to delete the stack with the option of retaining resources selected, followed by importing the relevant resources into a new stack, if it isn't practical to recreate them. If CFN doesn't give you the option to retain the stack's resources, you could try creating an IAM role with limited permissions to remove the stack but not the resources, then assuming the new role, and using it to delete the stack forcibly, while the limited permissions prevent the resources from being deleted.
You are right, actually cfn stack cannot rollback because it is trying to delete a logGroup with asterisk character but it failed to create it in the first place. It failed to delete it (because of validation) so I could not delete the cfn stack, but managed to do it at the end by using force delete. Thanks everyone.
answered 2 years ago
Relevant content
asked 9 months ago
