CompositeAlarm
Source:
src/AWS/CloudWatch/CompositeAlarm.ts
A CloudWatch composite alarm — combines the states of other alarms with
a boolean AlarmRule expression so a single alarm (and its actions)
reflects overall health.
Creating Composite Alarms
Section titled “Creating Composite Alarms”Composite Rule
const composite = yield* CompositeAlarm("HighSeverity", { AlarmRule: 'ALARM("HighErrors") OR ALARM("HighLatency")',});Compose Alarm Resources with Output.interpolate
const errors = yield* Alarm("HighErrors", { MetricName: "Errors", Namespace: "AWS/Lambda", Statistic: "Sum", Period: 60, EvaluationPeriods: 1, Threshold: 1, ComparisonOperator: "GreaterThanOrEqualToThreshold",});
const composite = yield* CompositeAlarm("HighSeverity", { AlarmRule: Output.interpolate`ALARM("${errors.alarmName}")`,});