MDAA TS Docs
    Preparing search index...

    Token-use alarms notifying a module-created SNS topic.

    Use cases: self-contained token-use alerting without a pre-existing topic

    AWS: CloudWatch alarms on AWS/Bedrock token metrics publishing to an MDAA-created CMK-encrypted SNS topic

    Validation: createNotificationTopic: true required; notificationTopicArn not allowed

    interface TokenUsageAlarmsCreatedTopicProps {
        accountTotal?: TokenThresholdsProps;
        createNotificationTopic: boolean;
        datapointsToAlarm?: number;
        evaluationPeriods?: number;
        models?: NamedModelTokenAlarmProps;
        notificationEmails?: string[];
        periodSeconds?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    accountTotal?: TokenThresholdsProps

    Token-use alarms on the account-wide total across all model IDs.

    Use cases: overall token-spend alerting without enumerating models

    AWS: CloudWatch alarms on the undimensioned AWS/Bedrock InputTokenCount / OutputTokenCount

    Validation: Optional; TokenThresholdsProps

    createNotificationTopic: boolean

    Set to true to have MDAA create an SNS topic encrypted with the module's KMS key, grant CloudWatch alarms in this module publish access, and export its ARN to SSM. Mutually exclusive with notificationTopicArn.

    Use cases: self-contained alerting without a pre-existing topic

    AWS: MDAA-created CMK-encrypted SNS topic

    Validation: Required; Boolean; must be true; mutually exclusive with notificationTopicArn

    datapointsToAlarm?: number

    Number of breaching periods within evaluationPeriods required to alarm (an "M of N" alarm).

    Use cases: ignoring a single burst while catching sustained token use

    AWS: CloudWatch alarm datapointsToAlarm

    Validation: Optional; Number; between 1 and evaluationPeriods

    evaluationPeriods
    

    integer

    1

    evaluationPeriods?: number

    Number of periods over which token use is compared to the threshold.

    Use cases: requiring sustained token use before alarming

    AWS: CloudWatch alarm evaluation periods

    Validation: Optional; Number; periodSeconds x evaluationPeriods at most 86400 for a period under 3600, at most 604800 otherwise

    1
    

    integer

    1

    Token-use alarms per model, keyed by a name for the model. Each entry lists every model and inference-profile ID callers use for that model.

    Use cases: per-model token-spend alerting

    AWS: CloudWatch alarms on AWS/Bedrock token metrics by ModelId

    Validation: Optional; NamedModelTokenAlarmProps

    notificationEmails?: string[]

    Email addresses subscribed to the module-created notification topic. Each address receives an SNS confirmation request and must confirm before delivery begins. Without a subscriber the created topic discards every notification; MDAA warns at synth in that case.

    Use cases: operator paging, routing alarms to a distribution list

    AWS: SNS email subscriptions on the created topic

    Validation: Optional; String[]; valid email addresses

    periodSeconds?: number

    Alarm period in seconds. Each period's token count is compared to the threshold.

    Use cases: matching the alarm window to the token budget's granularity

    AWS: CloudWatch alarm period

    Bedrock publishes token metrics at one-minute resolution, so the period is a whole number of minutes.

    Validation: Optional; Number; multiple of 60; periodSeconds x evaluationPeriods at most 86400 for a period under 3600, at most 604800 otherwise

    300
    

    integer

    60

    60