Open ghost opened 4 years ago
is it this page? https://docs.aws.amazon.com/cdk/latest/guide/how_to_set_cw_alarm.html
I would combine the metric and alarm code in the first example
const metric = new cloudwatch.Metric({
namespace: 'MyNamespace',
metricName: 'MyMetric',
dimensions: { MyDimension: 'MyDimensionValue' }
});
const alarm = new cloudwatch.Alarm(this, 'Alarm', {
metric,
threshold: 100,
evaluationPeriods: 3,
datapointsToAlarm: 2,
});
I would also give a real example or state the example shows how to use it with a custom metric named "MyMetric" in the namespace
"MyNamespace". I don't remember dimensions
of the top of my head but they were somewhat restrictive in what CloudWatch supported.
Received a customer report that it doesn't work