Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make anomaly detection alarm work on math expression (#426)
Fixes #425 Fixes #340 ### Changes Changes to the implementation of `AnomalyDetectionMathExpression`: * Fixed an issue where `thresholdMetricId` was assigned the incorrect expression id when multiple math expressions were present in the generated CFN template. * Modified `returnData` to be true only for the `ANOMALY_DETECTION_BAND` function and its direct dependency, rather than for all of the metrics in `Metrics`. I haven't come across any internal or external documentation indicating that two `returnData: true` are necessary for anomaly detection. However, after doing some experiments on CFN, this appears to be true. ### Testing I copied the fix into my own CDK package, with the fix, I was able to deploy my stacks. --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_
- Loading branch information