Posted On: Mar 14, 2023
Application Auto Scaling customers can now use arithmetic operations and mathematical functions to customize the metrics used with Target Tracking policies. Target Tracking works like a thermostat - it continuously changes the capacity of the scaled resource to maintain the scaling metric at the customer-defined target level.
Customers can use arithmetic operators (such as +, -, /, and *) and mathematical functions (such as Sum and Average) to easily create custom metrics based on existing CloudWatch metrics. Application Auto Scaling offers support to automatically scale capacity of 13 supported AWS services, including Amazon Elastic Container Service (ECS) services. Specifically, Target Tracking works like a thermostat - it continuously changes the capacity of the scaled resource to maintain the specified metric at a customer-defined target level. Today’s release makes it easier and cheaper to configure Target Tracking with custom metrics.
Target Tracking offers out-of-the-box support for the most common metrics such as CPU Utilization of ECS services . In some cases, customers want to scale based on their own application-specific metrics, such as the number of requests served, or based on metrics published by other AWS services , such as AWS Simple Queue Service. Until today, you would have had to create and pay for custom CloudWatch metrics for Target Tracking to consume. Now, if the custom metric is a simple function of other existing metrics, you can use CloudWatch Metric Math in the Target Tracking policy, instead of publishing (and paying for) a new custom CloudWatch metric. For example, to define a custom metric representing the SQS messages per task in a ECS service, you could take the existing SQS metric for messages in queue and simply divide it by capacity in the Target Tracking Policy configuration using Metric Math to make it work with your Target Tracking policy.
Target Tracking is available through AWS Command Line Interface (CLI) and AWS SDKs in all public AWS Regions. To learn more, visit the Application Auto Scaling documentation.