Hi, I'm running into an issue when trying to run `...
# general
Hi, I'm running into an issue when trying to run
pulumi up
I am getting the following error
error: deleting urn:pulumi:production::insig-express::awsx:x:ecs:Cluster$awsx:x:autoscaling:AutoScalingGroup$awsx:x:autoscaling:AutoScalingLaunchConfiguration$aws:ec2/launchConfiguration:LaunchConfiguration::apps-autoscaling-prod: error deleting Autoscaling Launch Configuration (app-autoscaling-prod-9341984): ResourceInUse: Cannot delete launch configuration app-autoscaling-prod-9341984 because it is attached to AutoScalingGroup app-autoscaling-prod-654d7a2-Instances-10K7OFBLTHZ2N
status code: 400
I've tried everything on this page https://www.pulumi.com/docs/troubleshooting with no luck. Any advice would be appreciated!
This error means that you have a dependency among your AWS resources that is not explicit in your Pulumi program in some way. Are you managing both the LaunchConfiguration and AutoScalingGroup in Pulumi? Can you share the changes you tried to make and the diff you are seeing?
Thanks, when looking at the diff it was much more obvious what the issue was. I had to manually delete an autoscaling group on AWS and refresh the stack. Do you, by chance, know how to properly configure autoscaling policies for a Fargate Service? I was configuring the service like below, but it seemed that it was creating an EC2 autoscaling group rather than a Service Auto Scaling policy: `const targetGroup = alb.createTargetGroup(
, {`
port: 80,
targetType: "instance"
`const autoScalingGroup = cluster.createAutoScalingGroup(
, {`
targetGroups: [targetGroup],
subnetIds: awsx.ec2.Vpc.getDefault().publicSubnetIds,
templateParameters: {
minSize: fargate.desiredCount || 2,
maxSize: fargate.maxCount || 10,
defaultCooldown: fargate.defaultCooldown || 60
launchConfigurationArgs: {
associatePublicIpAddress: true
, {`
targetValue: 50,
`const policy = autoScalingGroup.scaleToTrackRequestCountPerTarget(
, {`
targetValue: 2000,
targetGroup: targetGroup,
Hey @refined-vegetable-66224, I’ve got into Fargate Autoscaling dilemma too. Did you ever find a solution for it? I stumbled upon the fact that service’s task definition uses awsvpc network mode (required for the AWS Fargate launch type), and I must choose IP as the target type. This doesn’t work with
method – under the hood it uses cloudformation template that expects that targetGroup will be of a different type -
A list of target groups to associate with the Auto Scaling group. All target groups must have the “instance” [targetType].
😣 1