Error says:
The requested configuration is currently not supported. Please check the documentation for supported configurations. Launching EC2 instance failed.
One likely cause of this for an AWS::AutoScaling::LaunchConfiguration
has to do with how it is trying to spin up the first EC2 instance.
What probably happened is you have one of your ASG's creating EC2 instances instantly, and the image you told it to pull doesn't exist or has some serious error.
For example, if you are using EKS, and you are pointing at one of the AMI images for a specific version of EKS, you may be pointing at an old one that got killed off by AWS:
e.g.
/aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id
The 1.14
version of Kubernetes disappeared in early 2019, and so now you can't use an ASG to start an AMI pointing at that image.
A work around this error is to force the CloudFormation template to not create any images initially. Set MinSize
and DesiredCapacity
to zero.
Type: 'AWS::AutoScaling::AutoScalingGroup'
Properties:
DesiredCapacity: 0
MinSize: 0
Or you go and use the correct AMI (one that still exists) so you can have a functional image when your ASG is coming up.
/aws/service/eks/optimized-ami/1.17/amazon-linux-2/recommended/image_id
# ^^^^ Changed to one still supported in late 2019
Additional docs:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html
Hope that helps someone.