-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
@aws-cdk/aws-cloudwatchRelated to Amazon CloudWatchRelated to Amazon CloudWatchbugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortin-progressThis issue is being actively worked on.This issue is being actively worked on.p1
Description
When creating Cloudwatch Alarm that makes use of anomaly detection the following error is raised at deploy time:
ComparisonOperators for ranges require ThresholdMetricId to be set (Service: AmazonCloudWatch; Status Code: 400; Error Code: ValidationError; Request ID: xxx; Proxy: null)
Reproduction Steps
aws_cloudwatch.Alarm(
self,
"my_alarm",
evaluation_periods=1,
metric=sqs_queue.metric_number_of_messages_sent(),
threshold=2,
statistic="Average",
comparison_operator=aws_cloudwatch.ComparisonOperator.LESS_THAN_LOWER_OR_GREATER_THAN_UPPER_THRESHOLD,
)
The Alarm construct works great for any of the other ComparisonOperators that do not rely on anomaly detection i.e. GreaterThanThreshold
.
Environment
- CLI Version : 1.62.0
- Framework Version: 1.64.0
- Node.js Version: v12.14.1
- OS : MacOS Catalina
- Language (Version): Python 3.7
This is 🐛 Bug Report
chuckwilbur, andresjovellanos, thiagobasilio-nanga, alfaproject, shayonj and 7 more
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-cloudwatchRelated to Amazon CloudWatchRelated to Amazon CloudWatchbugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortin-progressThis issue is being actively worked on.This issue is being actively worked on.p1