Terraform: Error creating launch configuration: AlreadyExists: Launch Configuration by this name already exists

If you’re creating an ASG using an AWS Launch Configuration, you cannot use a name for the Launch Configuration.

The solution? Simply omit name from your launch configuration.

 

https://github.com/hashicorp/terraform/issues/3665

Launch Configurations cannot be updated after creation with the Amazon Web Service API.

https://www.terraform.io/docs/providers/aws/r/launch_configuration.html#using-with-autoscaling-groups

 

Auto Scaling Group: Launch of new EC2 instance fails – Reason: You have requested more instances (x) than your current instance limit of y allows for the specified instance type

What happens when an ASG fails to create instances because you’ve reached your limit of instance types in that Region?

E.g. you’re getting this error:

Failed: Launching a new EC2 instance.

Reason: You have requested more instances (x) than your current instance limit of u allows for the specified instance type. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit. Launching EC2 instance failed.

 

So you put in a request to increase the limits. But what happens to the ASG – does it continue to try launching new instances – and when?

If you have multiple AZs and a single AZ is out of capacity it will try a few times then launch in another AZ.

But simply, yes, it will keep trying to launch in a Region.