I know how to create an alarm using AWS CDK but I don't know how to add a notification to that alarm. How do I do that?
This is my code for the alarm:
/**
* Alarm for CPU above 75%
*/
const metric = cluster.metricCPUUtilization();
new cloudwatch.Alarm(this, `CPU above 75% alarm` , {
metric: metric,
threshold: 75,
evaluationPeriods: 3,
datapointsToAlarm: 2,
});
This is what it looks like in the console:
