fix(ttl-reaper): add alarm for the reaper not being invoked at all - #504
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
) The four alarms from #469 all correctly use TreatMissingData: notBreaching -- no sentinel datapoint genuinely is good news. But that means a reaper that never runs (disabled EventBridge rule, deleted schedule, reserved concurrency 0, or the function deleted) produces zero breaching datapoints across all four, so nothing pages while nothing is being enforced. The existing invocation-errors alarm doesn't cover it either: AWS/Lambda Errors requires an invocation to produce a datapoint at all. New NotInvokedAlarm on AWS/Lambda Invocations, 30-minute window (~3 missed ticks at rate(10 minutes)), the one alarm in this stack that intentionally uses TreatMissingData: breaching, since absence of data is exactly the failure being detected here. Fixes #475
scttfrdmn
force-pushed
the
fix/475-reaper-not-running-alarm
branch
from
August 18, 2026 03:53
0d91d3d to
4a8c7b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The four alarms added by #469 (
…-reached-no-accounts,…-account-unreachable,…-fsx-unreachable,…-invocation-errors) all correctly useTreatMissingData: notBreaching— no sentinel datapoint genuinely is good news. But that means a reaper that never runs at all — the EventBridge rule disabled, its schedule deleted or target detached, reserved concurrency set to 0, or the function deleted outright — produces zero breaching datapoints across all four, so they all sit contentedly inOKwhile nothing is being enforced.…-invocation-errorsdoesn't cover it either:AWS/LambdaErrorsrequires an invocation to produce a datapoint at all — no invocation, no error, no alarm.This is #469's own thesis one level up, and #65's two levels up:
sporedcan die silently → the reaper could fail silently (#469) → the reaper can be absent silently (this).Fix: new
NotInvokedAlarmonAWS/LambdaInvocations,Sum,Period: 1800(~3 missed ticks at the defaultrate(10 minutes)),ComparisonOperator: LessThanThreshold,Threshold: 1, and — the one alarm in this template where it's correct —TreatMissingData: breaching, since absence of data is exactly the failure this alarm exists to detect. Documented in the README's sentinel/alarm table alongside the other four, with a comment explaining why this alarm'sTreatMissingDatadiffers from its neighbors (per the issue's own request, so nobody "fixes" the inconsistency later).Fixes #475.
Test plan
sam validate --template-file template.yaml --lint— cleango build ./...,go vet ./...,go test ./...inlambda/ttl-reaper— cleanNotInvokedAlarmresource is present via a Python YAML-with-CFN-tags parseCHANGELOG.mdupdated under## [Unreleased]Acceptance from the issue (deploy-time verification, not done in this PR):
OK