Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(autoscaling): can't use
MathExpression
in scaleOnMetric
It was not possible to use `MathExpression` objects in AutoScaling, because the `Alarm` interface has a bug: it takes "override" arguments like "period" and "statistic" that could and should have already been encoded into the `Metric` object passed to the alarm. Subsequently, AutoScaling used this ill-advised feature to force the period of metrics to 1 minute. This caused an invalid render for math expressions and was probably ill-advised to begin with. We should be respecting the customer's period on the metric they pass in. Fixes #5776. BREAKING CHANGE: AutoScaling by using `scaleOnMetric` will no longer force the alarm period to 1 minute, but use the period from the Metric object instead (5 minutes by default). Use `metric.with({ period: Duration.minute(1) })` to create a high-frequency scaling policy.
- Loading branch information
1 parent
d5632ea
commit d4c1b0e
Showing
5 changed files
with
168 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters