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
Fixes #425 Fixes #340
Changes
Changes to the implementation of
AnomalyDetectionMathExpression
:thresholdMetricId
was assigned the incorrect expression id when multiple math expressions were present in the generated CFN template.returnData
to be true only for theANOMALY_DETECTION_BAND
function and its direct dependency, rather than for all of the metrics inMetrics
.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