Skip to content

Commit

Permalink
Fixed ResizeService AO setting the wrong min/max on a ScalableTarget. (
Browse files Browse the repository at this point in the history
  • Loading branch information
dkirillov authored Jan 31, 2018
1 parent bbaa2b1 commit 6263af2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ private void resizeAutoScalingGroup(Service service) {
.withScalableDimension(ScalableDimension.EcsServiceDesiredCount)
.withResourceId(String.format("service/%s/%s", ecsClusterName, service.getServiceName()))
.withRoleARN(service.getRoleArn())
.withMinCapacity(0)
.withMaxCapacity(desiredCount);
.withMinCapacity(description.getCapacity().getMin())
.withMaxCapacity(description.getCapacity().getMax());

updateTaskStatus(String.format("Resizing Scalable Target of %s to %s instances", service.getServiceName(), desiredCount));
autoScalingClient.registerScalableTarget(request);
Expand Down

0 comments on commit 6263af2

Please sign in to comment.