Jenkins AWS Spot fleet plugin doesn't automatically scale spot instances Jenkins AWS Spot fleet plugin doesn't automatically scale spot instances jenkins jenkins

Jenkins AWS Spot fleet plugin doesn't automatically scale spot instances


I had the same issue and by looking in Jenkins' logs I saw it tried to terminate the instances but was refused to by AWS.

So, I checked in AWS Cloudtrail all the actions Jenkins tried and for which there was an error.

In order for the plugin to scale your Spot Fleet, check that your AWS EC2 Spot Fleet plugin has the following permissions with the right conditions:

ec2:TerminateInstancesec2:ModifySpotFleetRequest

In my case, the condition in the policy was malformed and didn't work.