kubernetes/kops · error

error deleting autoscaling launch configuration %q: %v

Error message

error deleting autoscaling launch configuration %q: %v

What it means

DeleteLaunchConfiguration failed during cleanup after the ASG was deleted; the configuration may already be gone or the credentials lack autoscaling:DeleteLaunchConfiguration.

Source

Thrown at upup/pkg/fi/cloudup/awsup/aws_cloud.go:449

			klog.V(2).Infof("Deleting autoscaling launch template %q", launchTemplate)
			req := &ec2.DeleteLaunchTemplateInput{
				LaunchTemplateName: aws.String(launchTemplate),
			}
			_, err := c.EC2().DeleteLaunchTemplate(ctx, req)
			if err != nil {
				return fmt.Errorf("error deleting autoscaling launch template %q: %v", launchTemplate, err)
			}
		}
	} else if template != "" {
		// Delete LaunchConfig
		{
			klog.V(2).Infof("Deleting autoscaling launch configuration %q", template)
			request := &autoscaling.DeleteLaunchConfigurationInput{
				LaunchConfigurationName: aws.String(template),
			}
			_, err := c.Autoscaling().DeleteLaunchConfiguration(ctx, request)
			if err != nil {
				return fmt.Errorf("error deleting autoscaling launch configuration %q: %v", template, err)
			}
		}
	}

	klog.V(8).Infof("deleted aws autoscaling group: %q", name)

	return nil
}

// DeleteInstance deletes an aws instance
func (c *awsCloudImplementation) DeleteInstance(i *cloudinstances.CloudInstance) error {
	ctx := context.TODO()
	if c.spotinst != nil {
		if featureflag.SpotinstHybrid.Enabled() {
			if _, ok := i.CloudInstanceGroup.Raw.(*autoscalingtypes.AutoScalingGroup); ok {
				return deleteInstance(ctx, c, i)
			}
		}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check autoscaling:DeleteLaunchConfiguration permissions
  2. Manually delete the leftover launch configuration if needed, then re-run the delete
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/awsup/aws_cloud.go:449 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/3f01e58255ea0fd0. Report an issue: GitHub.