ECS Step Scaling option always disabled on new UI ?

1

Hi there,

I used to configure my ECS services to scale on a "Step Scaling" mode. Currently, after the new UI has been set to default, I'm seeing that the Step Scaling option is always disabled.See screenshot here

The only possibility I found is Target Tracking which does not give you too much flexibility.

I will appreciate any help on how to either get back to the previous UI, or been able to use Step Scaling on the new one.

Thanks a lot

4 Answers
1
Accepted Answer

On the left menu, at the top, there is toggle, "New ECS Experience". Turn it off to go to the classic console.

profile pictureAWS
EXPERT
kentrad
answered a year ago
  • Sorry to make a comment: The question has two parts, Mr Kentrad only answered one part, then how come the answer was accepted. The second part was answered by rePost-User-2073239, so his answer must be accepted by AWS. Is there any flaw to the system?

  • Turning off the new UI doesn't seem to be an option anymore. Is the only workaround to use the CLI now?

1

As kentrad mentioned, if you go rollback the UI and go back to the previous one you can do it. It seems they have not implemented the Step Scaling in the new UI... (wondering why they are setting as default a UI which is under construction)

answered a year ago
1

Well this sucks... Thanks for needlessly ruining multiple user experiences... good bye click ops :\

Per the following, we can no longer access the classic Web GUI experience in 2024++

https://repost.aws/en/questions/QU6BsCcnG5RWqLfJJCzFBg4w/why-aws-new-console-ui-for-ecs-not-provide-blue-green-deployment-option
"The classic Amazon ECS console is reaching the end of life and will no longer be available after December 4, 2023."

It seems that the new Web GUI experience effectively needlessly made the ECS platform worse by needlessly removing the ability to do things via GUI/click ops, since it got pushed through without feature parody of the old GUI experience.

  • Configuring Step Scaling
  • Blue Green Deployments
  • ECS Tag Propagation
  • Others?

So now many ECS things that used to be easily doable via GUI click ops. Can now only be done using solutions that use AWS APIs (like AWS CLI, CDK, etc). The greyed out screenshot's been basically updated to say use AWS CLI if you want to configure this. Greyed out GUI has updated message I'll write out the message in the screenshot for SEO purposes:

Step scaling Use AWS CLI to increase or decrease the number of tasks that your service runs based on a set of scaling adjustments, known as step adjustments, that vary based on the size of the alarm breach.

The AWS CLI is an annoying UX (user experience), but here's some reference in case anyone finds this via google search and is forced to figure this out.

The following reference is based on this which has a few more examples https://docs.aws.amazon.com/autoscaling/application/userguide/create-step-scaling-policy-cli.html

export AWS_REGION=us-west-2
export ECS_CLUSTER_NAME=test
export ECS_SERVICE_NAME=test
export ECS_REUSABLE_IDEMPOTENT_AUTOSCALING_POLICY_NAME=my-custom-ecs-step-scale-out-policy
# ^-- I named it this way to reflect it doesn't have to be pre-existing, it'll create/replace whatever name you specify.
# Side note this is aws cli v2, and if you need a scale in example see the link above.

#v-- copy paste a multi-line command based on tee EOF to generate a file.
tee ecs-step-scale-out.config.json << EOF
{
  "AdjustmentType": "PercentChangeInCapacity",
  "MetricAggregationType": "Average",
  "Cooldown": 60,
  "MinAdjustmentMagnitude": 1,
  "StepAdjustments": [ 
    {
      "MetricIntervalLowerBound": 0.0,
      "MetricIntervalUpperBound": 15.0,
      "ScalingAdjustment": 10
    },
    {
      "MetricIntervalLowerBound": 15.0,
      "MetricIntervalUpperBound": 25.0,
      "ScalingAdjustment": 20
    },
    {
      "MetricIntervalLowerBound": 25.0,
      "ScalingAdjustment": 30
    }
  ]
}
EOF

aws application-autoscaling put-scaling-policy \
  --service-namespace ecs \
  --scalable-dimension ecs:service:DesiredCount \
  --policy-name $ECS_REUSABLE_IDEMPOTENT_AUTOSCALING_POLICY_NAME \
  --resource-id service/$ECS_CLUSTER_NAME/$ECS_SERVICE_NAME \
  --policy-type StepScaling \
  --step-scaling-policy-configuration file://ecs-step-scale-out.config.json

Also you can no longer see ECS step scaling policies in the GUI either... CLI to view step scaling

This service has step scaling policies configured. Use AWS CLI to add, edit, or remove step scaling policies for this service. If you continue to edit the service using the new console, the step scaling policy configuration won't be updated.

You have to use crazy AWS CLI commands to see and manage it, here's more references:

# Note this has a dependency on jq (json query) cli tool
aws application-autoscaling describe-scaling-policies --service-namespace ecs | cat | jq '.ScalingPolicies[] | select(.PolicyType | contains("StepScaling") )'

{
  "PolicyARN": "arn:aws:autoscaling:us-west-2:853680132675:scalingPolicy:43f23a7b-8d3a-4091-9709-ad7b57604a65:resource/ecs/service/test/test:policyName/my-custom-ecs-step-scale-out-policy",
  "PolicyName": "my-custom-ecs-step-scale-out-policy",
  "ServiceNamespace": "ecs",
  "ResourceId": "service/test/test",
  "ScalableDimension": "ecs:service:DesiredCount",
  "PolicyType": "StepScaling",
  "StepScalingPolicyConfiguration": {
    "AdjustmentType": "PercentChangeInCapacity",
    "StepAdjustments": [
      {
        "MetricIntervalLowerBound": 0.0,
        "MetricIntervalUpperBound": 15.0,
        "ScalingAdjustment": 10
      },
      {
        "MetricIntervalLowerBound": 15.0,
        "MetricIntervalUpperBound": 25.0,
        "ScalingAdjustment": 20
      },
      {
        "MetricIntervalLowerBound": 25.0,
        "ScalingAdjustment": 30
      }
    ],
    "MinAdjustmentMagnitude": 1,
    "Cooldown": 60,
    "MetricAggregationType": "Average"
  },
  "Alarms": [],
  "CreationTime": "2024-03-27T17:54:53.135000-04:00"
}

# Deleting also needs AWS CLI command
# luckily you can re-run the above command to verify the delete was successful.
aws application-autoscaling delete-scaling-policy \
--service-namespace ecs \
--scalable-dimension ecs:service:DesiredCount \
--policy-name $ECS_REUSABLE_IDEMPOTENT_AUTOSCALING_POLICY_NAME \
--resource-id service/$ECS_CLUSTER_NAME/$ECS_SERVICE_NAME


Related side note: Kind of falls into the "Others?" category of how now the GUI experience becomes unintuitive.

If you want an ECS service to scale based on an SQS queue triggering a CloudWatch metric alarm, ECS step scaling is the only option for how to pull that off. Thing about the GUI screenshot below is that the only way to make that ECS service show up in the GUI, is if it already has an ECS step scaling policy attached. So you have to use the AWS CLI to attach a step scaling policy as a prerequisite for the GUI to work correctly / for the ECS service to even show up as an option in the GUI which is very unintuitive.

CloudWatch Alarm Autoscaling

ChrisM
answered 23 days ago
0

We continue to improve the new ECS console and add functionality. You can still use the classic ECS console and to do so you can switch back by turning off the "New ECS experience" toggle and the top of the left menu. You can see list of features are currently only available in the class ECS console https://docs.aws.amazon.com/AmazonECS/latest/developerguide/new-console.html

You can also read about the new ECS console in the blog post https://aws.amazon.com/blogs/containers/announcing-upcoming-changes-to-the-amazon-ecs-console/

Sergey
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions