Skip to content

Severity Aware AWS Health Notifications with Automatic Escalation

12 minute read
Content level: Expert
0

AWS Health events arrive without business context, so in multi-account organizations critical issues get lost among routine notices and duplicates. This solution rates each event CRITICAL, HIGH or MEDIUM using the service, environment and blast radius, then routes it to the account's owners on the right channels. Unacknowledged critical alerts escalate automatically, so the right people act fast without alert fatigue.

Introduction

AWS Health tells you when an AWS service issue, scheduled change, or account notification could affect your resources. In a multi account organization, the hard part isn't receiving these events. It's getting the right event to the right person on the right channel at the right time, without burying on call engineers in noise.

A common pattern is to forward every AWS Health event to a single email list or Slack channel. That works for a handful of accounts. At scale it fails in predictable ways:

  • An EC2 issue in a production account looks the same as a scheduled maintenance notice in a sandbox account.
  • The same event fires for many accounts and floods the channel with duplicates.
  • A critical alert sent at 2 a.m. goes unread, and nobody escalates.

This article shows how to build a severity aware notification pipeline that complements Health Events Intelligence Dashboards and Insights (HEIDI) or any AWS Health dashboard you already use. The pipeline does the following:

  1. Classifies every AWS Health event as CRITICAL, HIGH, or MEDIUM, based on the service, the environment, and how many resources are affected.
  2. Removes duplicate alerts for the same event and account.
  3. Adds account owners, delivery channels, and quiet hours preferences to each alert.
  4. Sends the alert to Slack, email, or paging, depending on severity.
  5. Escalates critical alerts that nobody acknowledges.

Architecture overview

AWS Health --> EventBridge rule --> Lambda: classify > dedup > enrich > route
                                          │                    │
                                          ▼                    ▼
                                 DynamoDB (registry +   SNS topics by severity
                                 notification state)     |- critical -> Slack, Email, Paging
                                          ▲              |- high -----> Slack, Email
                                          │              `- medium ---> Email
                                 Step Functions escalation (CRITICAL only)
                                 wait 15 min > check ack > escalate L1 > wait > escalate L2
  • EventBridge rule: Captures aws.health events: issues, account notifications, scheduled changes, and abuse events.
  • Processor Lambda function: Classifies, deduplicates, enriches, and routes each event for each affected account.
  • DynamoDB account-registry: Stores each account's environment, owners, escalation contacts, channel preferences, and service tier overrides.
  • DynamoDB notifications: Records each notification's state (SENT, ACKNOWLEDGED, ESCALATED) and is used to detect duplicates.
  • SNS topics (one per severity): Send each alert to channel specific notifier functions.
  • Step Functions: Escalate critical alerts when nobody acknowledges them.

Tip: If you use AWS Organizations, enable the organizational view for AWS Health and deploy the EventBridge rule in a delegated administrator account. One pipeline then handles events for every member account.

Step 1: Capture AWS Health events

{
  "source": ["aws.health"],
  "detail-type": ["AWS Health Event", "AWS Health Abuse Event"],
  "detail": {
    "eventTypeCategory": ["issue", "accountNotification", "scheduledChange"]
  }
}

Keep the same pattern in your infrastructure as code. A common mistake is to drop the eventTypeCategory filter or the abuse event type when translating the console rule into CDK. That changes what the pipeline receives without anyone noticing.

Step 2: Classify severity

Classification uses four inputs in a fixed order of priority:

  1. Security override. Credential exposure, abuse reports, and similar security events are always CRITICAL. Check the event type codes your accounts actually receive, and adjust the list.

  2. Blast radius. A large number of affected resources raises the severity, whatever the service.

  3. Service tier × environment. Tier 1 services are ones whose failure stops your workloads (compute, database, identity, storage). Tier 2 services are ones whose failure degrades them (queues, caches, analytics).

  4. Scheduled changes. Planned work is never CRITICAL, but Tier 1 changes in production are HIGH.

    TIER_1_SERVICES = {'ec2', 'rds', 'eks', 'iam', 's3', 'dynamodb', 'lambda', 'ecs'} TIER_2_SERVICES = {'sqs', 'sns', 'cloudfront', 'elasticache', 'redshift', 'glue'} SECURITY_EVENT_TYPES = {'AWS_RISK_CREDENTIALS_EXPOSED'} SECURITY_EVENT_PREFIXES = ('AWS_ABUSE_',) # abuse events, e.g. AWS_ABUSE_DOS_REPORT

    SEVERITY_RANK = {'MEDIUM': 1, 'HIGH': 2, 'CRITICAL': 3}

    def classify_severity(detail: dict, account_meta: dict) -> tuple[str, str]: service = detail.get('service', '').lower() category = detail.get('eventTypeCategory', '') event_type = detail.get('eventTypeCode', '') status = detail.get('statusCode', '') entity_count = len(detail.get('affectedEntities', [])) env = account_meta.get('environment', 'production') # fail safe: unknown = prod overrides = account_meta.get('service_tier_overrides', {})

     tier = {'tier_1': 1, 'tier_2': 2}.get(overrides.get(service)) or \
            (1 if service in TIER_1_SERVICES else 2 if service in TIER_2_SERVICES else 3)
    
     # Rule 1 – security always wins
     if event_type in SECURITY_EVENT_TYPES or event_type.startswith(SECURITY_EVENT_PREFIXES):
         return 'CRITICAL', f'Security event: {event_type}'
    
     # Rule 2 – active issues: tier × environment
     if category == 'issue' and status in ('open', 'upcoming'):
         matrix = {
             (1, 'production'): 'CRITICAL', (1, 'staging'): 'HIGH',
             (2, 'production'): 'HIGH',     (3, 'production'): 'HIGH',
         }
         severity = matrix.get((tier, env), 'MEDIUM')
         reason = f'Active issue on {service} (tier {tier}) in {env}'
    
         # Rule 3 – blast radius can only RAISE severity, never lower it
         if entity_count > 20:
             blast = 'CRITICAL'
         elif entity_count > 10:
             blast = 'HIGH'
         else:
             blast = 'MEDIUM'
         if SEVERITY_RANK[blast] > SEVERITY_RANK[severity]:
             severity, reason = blast, f'{reason}; blast radius {entity_count} resources'
         return severity, reason
    
     # Rule 4 – scheduled changes
     if category == 'scheduledChange':
         if env == 'production' and tier == 1:
             return 'HIGH', f'Scheduled change on {service} (tier 1) in production'
         return 'MEDIUM', f'Scheduled change on {service} in {env}'
    
     return 'MEDIUM', f'Informational: {category} on {service} in {env}'
    

Common pitfall: If the tier × environment rule returns early, a blast radius check placed after it never runs for active issues. Evaluate both and keep the higher severity, as shown above.

Classification matrix (active issues)

  • Tier 1 service. Production: CRITICAL. Staging: HIGH. Dev or other: MEDIUM.
  • Tier 2 service. Production: HIGH. Staging: MEDIUM. Dev or other: MEDIUM.
  • Untiered service. Production: HIGH. Staging: MEDIUM. Dev or other: MEDIUM.
  • More than 10 affected resources. Production: at least HIGH. Staging: at least HIGH. Dev or other: at least HIGH.
  • More than 20 affected resources. Production: CRITICAL. Staging: CRITICAL. Dev or other: CRITICAL.
  • Security event. Production: CRITICAL. Staging: CRITICAL. Dev or other: CRITICAL.

Every classification returns a reason string that goes into the alert. Responders see why an alert is critical, and you can review the reasons later to tune the thresholds.

Step 3: Deduplicate per event and account

AWS Health can send several updates for the same event. Use a composite key (event_arn, account_id) in DynamoDB so each check is a single lookup:

def is_duplicate(event_arn: str, account_id: str, new_status: str) -> bool:
    try:
        item = notifications_table.get_item(
            Key={'event_arn': event_arn, 'account_id': account_id}
        ).get('Item')
    except ClientError as e:
        logger.warning("Dedup check failed, failing open: %s", e)
        return False            # better to double-notify than to miss a critical event
    if not item:
        return False
    # Re-notify only on a meaningful state change (for example, open → closed)
    return item.get('event_status') == new_status

Two design choices matter here:

  • Fail open. If DynamoDB can't be read, send the alert anyway. A duplicate is cheaper than a missed outage.
  • Notify again on status changes. Responders want to know when an issue resolves, so treat a status change as a new notification.

Tip: To store the item and claim it in one step, use put_item with a ConditionExpression. This stops two concurrent Lambda invocations from both sending the same alert.

Step 4: Enrich and route

Enrichment turns a raw AWS Health event into a self contained alert. Downstream notifier functions then don't need any further lookups.

  • CRITICAL. Recipients: Primary + secondary + escalation contacts. Channels: Slack, email, paging, phone. Quiet hours: Ignored.

  • HIGH. Recipients: Primary + secondary. Channels: Slack, email. Quiet hours: Respected.

  • MEDIUM. Recipients: Primary. Channels: Email only. Quiet hours: Respected.

    def route_notification(payload: dict): sns.publish( TopicArn=TOPIC_MAP[payload['severity']], Message=json.dumps(payload), MessageAttributes={ 'severity': {'DataType': 'String', 'StringValue': payload['severity']}, 'account_id': {'DataType': 'String', 'StringValue': payload['account_id']}, }, ) notifications_table.put_item(Item={ 'event_arn': payload['event_arn'], 'account_id': payload['account_id'], 'severity': payload['severity'], 'event_status': payload['status'], 'state': 'SENT', 'acknowledged': False, 'sent_at': payload['timestamp'], 'expires_at': int(time.time()) + 90 * 86400, # DynamoDB TTL – keep 90 days }) if payload['severity'] == 'CRITICAL': sfn.start_execution( stateMachineArn=os.environ['ESCALATION_SM_ARN'], name=payload['notification_id'], # idempotent: one escalation per alert input=json.dumps({k: payload[k] for k in ('event_arn', 'account_id', 'notification_id')}), )

Keep the payload contract consistent. Every notifier should read its settings from the same field names the processor writes. For example, if the processor writes channels.slack_channel, the Slack notifier must read channels, not a separate notification_prefs field. Define the payload as a schema (for example, a JSON Schema or a TypedDict) and test both sides against it.

Step 5: Escalate unacknowledged critical alerts

A critical alert that nobody reads is no better than no alert. A Step Functions state machine waits for an acknowledgement and then escalates step by step:

{
  "StartAt": "WaitForAck",
  "States": {
    "WaitForAck":      { "Type": "Wait", "Seconds": 900, "Next": "CheckAck" },
    "CheckAck":        { "Type": "Task", "Resource": "${CheckAckFunctionArn}", "Next": "IsAcked" },
    "IsAcked":         { "Type": "Choice",
                         "Choices": [{ "Variable": "$.acknowledged", "BooleanEquals": true, "Next": "Done" }],
                         "Default": "EscalateL1" },
    "EscalateL1":      { "Type": "Task", "Resource": "${EscalateFunctionArn}",
                         "Parameters": { "level": "L1", "event_arn.$": "$.event_arn", "account_id.$": "$.account_id" },
                         "Retry": [{ "ErrorEquals": ["States.TaskFailed"], "MaxAttempts": 3, "BackoffRate": 2 }],
                         "Next": "WaitForL1Ack" },
    "WaitForL1Ack":    { "Type": "Wait", "Seconds": 900, "Next": "CheckL1Ack" },
    "CheckL1Ack":      { "Type": "Task", "Resource": "${CheckAckFunctionArn}", "Next": "IsL1Acked" },
    "IsL1Acked":       { "Type": "Choice",
                         "Choices": [{ "Variable": "$.acknowledged", "BooleanEquals": true, "Next": "Done" }],
                         "Default": "EscalateL2" },
    "EscalateL2":      { "Type": "Task", "Resource": "${EscalateFunctionArn}",
                         "Parameters": { "level": "L2", "event_arn.$": "$.event_arn", "account_id.$": "$.account_id" },
                         "Next": "Done" },
    "Done":            { "Type": "Succeed" }
  }
}

L1 and L2 map to the escalation contacts stored in the account registry, such as a platform lead and then a service delivery or engagement manager. Pick a wait time that matches your incident response SLA. Fifteen minutes is a common starting point.

Securing the acknowledgement

An Acknowledge button stops the escalation, so treat it as a privileged action:

  • Use a Slack app with an interactivity endpoint behind Amazon API Gateway, rather than an incoming webhook.
  • Verify the Slack request signature (X-Slack-Signature) in a Lambda authorizer.
  • Check that the person who clicked is an authorized contact for that account, then record acknowledged_by and acknowledged_at.

Without these checks, anyone in the channel could silence a critical alert.

Step 6: Data model

account-registry (partition key: account_id)

  • environment: production / staging / dev.
  • primary_contact, secondary_contact: {name, email, slack_id}.
  • escalation_contacts: {L1: {...}, L2: {...}}.
  • notification_preferences: {slack_enabled, email_enabled, quiet_hours_start, quiet_hours_end, timezone}.
  • service_tier_overrides: {"redshift": "tier_1"}, for when an analytics service is business critical to that account.
  • secrets_ref: Secrets Manager ARN for the Slack signing secret and paging integration key.

notifications (partition key: event_arn, sort key: account_id). Holds the fields severity, event_status, state, acknowledged, acknowledged_by, acknowledged_at, escalation_level, and expires_at (TTL).

Don't store webhooks or integration keys in DynamoDB attributes. Keep them in AWS Secrets Manager and store only the ARN. Enable encryption at rest with a customer managed AWS KMS key, because the registry holds contact details (PII).

Step 7: Deploy with the AWS CDK (excerpt)

key = kms.Key(self, "HeidiKey", enable_key_rotation=True)

registry = dynamodb.Table(self, "Registry",
    partition_key=dynamodb.Attribute(name="account_id", type=dynamodb.AttributeType.STRING),
    billing_mode=dynamodb.BillingMode.PAY_PER_REQUEST,
    encryption=dynamodb.TableEncryption.CUSTOMER_MANAGED, encryption_key=key,
    point_in_time_recovery=True)

notifications = dynamodb.Table(self, "Notifications",
    partition_key=dynamodb.Attribute(name="event_arn", type=dynamodb.AttributeType.STRING),
    sort_key=dynamodb.Attribute(name="account_id", type=dynamodb.AttributeType.STRING),
    billing_mode=dynamodb.BillingMode.PAY_PER_REQUEST,
    encryption=dynamodb.TableEncryption.CUSTOMER_MANAGED, encryption_key=key,
    time_to_live_attribute="expires_at")

dlq = sqs.Queue(self, "ProcessorDLQ", encryption=sqs.QueueEncryption.KMS, encryption_master_key=key)

processor = _lambda.Function(self, "Processor",
    runtime=_lambda.Runtime.PYTHON_3_12, handler="processor.lambda_handler",
    code=_lambda.Code.from_asset("lambda/processor"),
    timeout=Duration.seconds(30), dead_letter_queue=dlq,
    tracing=_lambda.Tracing.ACTIVE)

events.Rule(self, "HealthRule",
    event_pattern=events.EventPattern(
        source=["aws.health"],
        detail_type=["AWS Health Event", "AWS Health Abuse Event"],
        detail={"eventTypeCategory": ["issue", "accountNotification", "scheduledChange"]}),
    targets=[targets.LambdaFunction(processor, retry_attempts=4, dead_letter_queue=dlq)])

for sev in ("critical", "high", "medium"):
    topic = sns.Topic(self, f"{sev}-topic", master_key=key)
    topic.grant_publish(processor)

Grant each function only the permissions it needs:

  • The processor needs GetItem/PutItem on the two tables, Publish on the three topics, and StartExecution on the escalation state machine.
  • Each notifier needs only its own channel's permissions, such as ses:SendTemplatedEmail scoped to a verified identity.

Operational best practices

  • Fail safe on unknown environments (treat as production): An account missing from the registry still gets loud alerts instead of silent ones.
  • Alarm on accounts missing from the registry: Unregistered accounts are a governance gap. Publish a metric and investigate it.
  • DLQ and retries on every asynchronous hop: An AWS Health event lost because Slack returned 500 is a missed incident.
  • Measure what matters: Track time to acknowledge, escalation rate, and alerts per severity per week.
  • Test with synthetic events: Use aws events put-events with recorded AWS Health payloads in your CI pipeline.
  • Review classifications regularly: Use the stored reason field to tune tiers and blast radius thresholds from real data.
  • Treat AWS Health as the source of truth: Include a link to the AWS Health Dashboard event in the alert.

Cost considerations

The design is fully serverless and pay per use. For a typical organization receiving a few thousand AWS Health events a month, the following services usually cost very little:

  • EventBridge
  • Lambda
  • DynamoDB on demand
  • SNS
  • Step Functions standard workflows

The main cost drivers are usually outside AWS: paging and telephony integrations, and on call time. That's why reducing noise through accurate classification and deduplication is the biggest saving. Check current rates on the pricing page for each service.

Conclusion

Forwarding AWS Health events is easy. Making them actionable takes three things:

  • Context aware severity, based on the service tier, the environment, and the blast radius.
  • Disciplined delivery, through deduplication, channel routing, and quiet hours.
  • Accountability, through verified acknowledgement and automatic escalation.

With EventBridge, Lambda, DynamoDB, SNS, and Step Functions, you can start small and refine it over time as your classification data grows.

References

Code samples are illustrative excerpts and omit imports, error handling, and some helper functions. The views and code in this article are provided as guidance. Review and test them against your organization's security and operational requirements before production use.