MDAA TS Docs
    Preparing search index...

    Configuration for CloudWatch alarms for Lambda function monitoring and alerting.

    Defines alarm conditions, thresholds, and notification actions for both single metric and metric math alarms with support for custom and AWS metrics.

    Use cases: Error rate alerting; Performance monitoring; Custom metric alarms; Multi-metric conditions

    AWS: CloudWatch alarm for Lambda function monitoring with SNS integration

    Validation: alarmName required; either metricName/namespace or metrics array required; threshold and evaluationPeriods required

    interface AlarmProps {
        actionsEnabled?: boolean;
        alarmActions?: string[];
        alarmDescription?: string;
        alarmName: string;
        comparisonOperator: string;
        datapointsToAlarm?: number;
        dimensions?: { [key: string]: string };
        evaluationPeriods: number;
        insufficientDataActions?: string[];
        metricName?: string;
        metrics?: MetricDataQueryProps[];
        namespace?: string;
        okActions?: string[];
        period?: number;
        statistic?: string;
        threshold: number;
        treatMissingData?: string;
        unit?: string;
    }
    Index

    Properties

    actionsEnabled?: boolean

    Whether alarm actions are enabled during state changes.

    alarmActions?: string[]

    SNS topic ARNs for ALARM state notifications.

    alarmDescription?: string

    Human-readable alarm description.

    alarmName: string

    Unique name for the alarm.

    comparisonOperator: string

    Comparison operator (e.g., GreaterThanOrEqualToThreshold).

    datapointsToAlarm?: number

    Datapoints that must breach threshold (M out of N evaluation).

    dimensions?: { [key: string]: string }

    Metric dimensions. Supports {{functionName}} placeholder.

    evaluationPeriods: number

    Number of consecutive periods the metric must breach the threshold.

    insufficientDataActions?: string[]

    SNS topic ARNs for INSUFFICIENT_DATA state notifications.

    metricName?: string

    Metric name for single metric alarms. Validated against metric filters for custom metrics.

    Metric data queries for metric math alarms. Mutually exclusive with metricName.

    namespace?: string

    Metric namespace. AWS/* namespaces bypass validation.

    okActions?: string[]

    SNS topic ARNs for OK state notifications.

    period?: number

    Evaluation period in seconds.

    statistic?: string

    Statistic for metric aggregation (e.g., Sum, Average).

    threshold: number

    Threshold value for alarm comparison.

    treatMissingData?: string

    Missing data treatment (notBreaching, breaching, ignore, missing).

    unit?: string

    CloudWatch metric unit.