Skip to content

The er-alerts SNS email subscription has never been confirmed — 19 armed alarms reach nobody #1107

Open

Description

@athvin

Every CloudWatch alarm in this account currently reaches nobody, and has
since the alarms were created. Found while diagnosing drift (core) in #1106 —
this is the cause of that failure.

Live state, read 2026-11-17

aws sns list-subscriptions-by-topic --region us-east-2 \
  --topic-arn arn:aws:sns:us-east-2:797781631727:er-alerts \
  --query 'Subscriptions[].[Protocol,Endpoint,SubscriptionArn]' --output text
# email   [email protected]   PendingConfirmation

PendingConfirmation is the literal value in the SubscriptionArn field — the
subscription has no ARN because it was never confirmed. Meanwhile:

aws cloudwatch describe-alarms --region us-east-2 \
  --query 'MetricAlarms[].[AlarmName,ActionsEnabled]' --output text | wc -l
# 19   (12 er-dev-*, 7 er-prod-*), every one ActionsEnabled=True

So 19 armed alarms publish to a topic whose only subscriber has never accepted
delivery. Nothing has ever been delivered.

Why it also breaks drift (core), and why it will keep doing so

AWS deletes an SNS email subscription that stays unconfirmed. The refresh-only
plan on 2026-11-16 recorded it as gone:

# aws_sns_topic_subscription.alerts_email has been deleted
  - endpoint             = "[email protected]" -> null
  - protocol             = "email"                 -> null
  - pending_confirmation = true                    -> null

tf-drift-classify.sh correctly called that REAL DRIFT, which is the gate
working, not a gate bug.

The dates line up: the operational alarms went in around 2026-11-09
(#1057/#1046), and drift went red on 2026-11-12 — about three days later,
matching AWS's deletion of an unconfirmed pending subscription. It has since
been re-created by the core apply that ran after #1098 on 2026-11-17, and
is pending again. So the loop is:

  1. apply re-creates the subscription → PendingConfirmation
  2. nobody confirms → AWS deletes it after ~3 days
  3. drift (core) goes red
  4. the next core apply re-creates it → back to 1

It will keep flapping, and the alarms keep reaching nobody, until the address
confirms once.

The fix is one click, and only the owner can do it

Terraform cannot confirm an email subscription — that is a property of SNS,
not a gap here, and alerts.tf already says so. Someone with access to
[email protected] needs to open the "AWS Notification - Subscription
Confirmation"
message and click Confirm subscription. If no such message
is in the inbox, re-send it:

# re-creates the pending subscription and re-sends the confirmation email
AWS_PROFILE=er-platform aws sns subscribe --region us-east-2 \
  --topic-arn arn:aws:sns:us-east-2:797781631727:er-alerts \
  --protocol email --notification-endpoint [email protected]

Then verify it took — the whole point is that pending and working look
identical in the console:

aws sns list-subscriptions-by-topic --region us-east-2 \
  --topic-arn arn:aws:sns:us-east-2:797781631727:er-alerts \
  --query 'Subscriptions[?SubscriptionArn!=`PendingConfirmation`]'
# must be non-empty

Worth considering afterwards

The aws-account-operations skill already warns that "whether an alarm
reaches anyone is a live check, not a read of the declaration."
This incident
shows the warning is not enough on its own — the state was unconfirmed for over
a week with 19 alarms armed, and the only thing that noticed was a drift job
nobody was reading.

Options, once confirmed:

  1. Accept it and rely on drift — now that kind probe red since 2026-11-10: KeyError 'token_hash' after the credential-omission fix #1106's other half is fixed, a red
    drift (core) means exactly this, which is a usable signal if someone
    reads it.
  2. Assert it in the health sweep — health-sweep is the natural owner of a
    "does the alert path actually terminate at a human" check, and the query
    above is the whole test.
  3. Move off email for the primary path (a confirmed HTTPS/chatops endpoint
    needs no human confirmation step and cannot silently expire), keeping email
    as a secondary. This is the only option that removes the failure mode rather
    than detecting it.

Activity

  1. added
    obs-backlog
    on Nov 17, 2026
  2. athvin commented on Nov 17, 2026

    @athvin
    OwnerAuthor

    Reopened — closed by accident for the second time in one session by the same mechanism, and I should have caught it.

    #1110's body said "This does not resolve #1107." GitHub's parser matches resolve #1107 and ignores the negation, exactly as it had already done to #1100 earlier today via "Does not close #1100". Two different verbs, same trap: a negated closing keyword still closes.

    Nothing about the incident has changed. The subscription is still unconfirmed:

    email  [email protected]  PendingConfirmation
    

    and 19 alarms remain armed against a topic that delivers to nobody.

    What #1110 did ship is the detector (#1109): drift.yml now runs an alert path (a confirmed subscriber) job daily. It was observed failing on a real run (dispatch 44032499223) with all four Terraform drift legs green:

    alert-path-check-test: 13 passed, 0 failed
    alert-path-check: THE ALARM PATH IS DEAD — 1 subscription(s), none confirmed:
      email d***@gmail.com — never confirmed
    

    So this is now loud instead of silent — but a detector does not deliver an alarm. This issue stays open until someone with access to the address clicks Confirm subscription in the "AWS Notification - Subscription Confirmation" email. If it is no longer in the inbox, re-send it:

    AWS_PROFILE=er-platform aws sns subscribe --region us-east-2 \
      --topic-arn arn:aws:sns:us-east-2:797781631727:er-alerts \
      --protocol email --notification-endpoint [email protected]

    The drift run after that should go fully green, which is also the only thing that will have exercised the new check's passing path against the live account.

  3. reopened this on Nov 17, 2026
  4. added
    mvp
    on Nov 26, 2026
  5. athvin commented on Dec 2, 2026

    @athvin
    OwnerAuthor

    2026-12-02 status: the pending subscription expired again, and a fresh confirmation was sent.

    • 06:05Z: er-alerts had 0 confirmed and 1 pending (email d***@gmail.com). The last Subscribe call before that was the core apply at 2026-11-30T06:20Z.
    • 06:50Z: 0 confirmed and 0 pending. CloudTrail shows no Unsubscribe or ConfirmSubscription, so AWS deleted the expired pending subscription itself. That came about 48 hours after the last Subscribe, sooner than the ~3 days assumed above.
    • 06:52:30Z: re-created with the recovery command from this issue (aws sns subscribe … --protocol email), which returned pending confirmation. A new confirmation email is in the alerts inbox.

    Still owed: the inbox owner clicks Confirm subscription in that new message, then we verify a test alert arrives. drift's alert path job stays red until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    mvpobs-backlog

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions