fizz.today

Ghost crons warming corpses

I was investigating a $911 cost spike on my employer’s March AWS bill. I found the usual suspects — RDS extended support, Bedrock model ramp, a tenant running inference Lambdas with 75% memory waste. Then I found two EventBridge rules firing every 5 minutes into dead targets.

The warmup pattern dates to ~2018 at a previous employer. AWS Lambda didn’t have provisioned concurrency yet. If your Lambda went cold, the next invocation got a multi-second cold start. For live vehicle telemetry hitting a prediction endpoint, that was unacceptable. So we built warmup Lambdas — a cron that pings your real Lambda every 5 minutes to keep the container hot. AWS added provisioned concurrency in 2019. The warmup pattern became obsolete. But the cron kept running.

The warmup Lambda was created for a prediction service that hasn’t been active in years. Someone deleted the function but left the EventBridge rule. A second warmup had the same story — function gone, rule still firing.

288 failed invocations per day per rule. 576 per day total. 17,000+ per month. If these were still hitting live functions, they’d be burning real money warming a service that no longer exists.

The EventBridge failures cost 58 sats a day — about one Sonnet call per month. The real cost isn’t the money. It’s the pattern of creating infrastructure that outlives its purpose because nobody owns the teardown. The Lambda was deleted in an act of cleanup. The rule that depends on it was not. The dependency graph was invisible.

Two aws events disable-rule commands. Thirty seconds. The investigation took three hours because the rules were buried under a $911 cost spike investigation and only surfaced when I was looking at what was invoking Lambdas during the expensive days.

Ghost crons are the infrastructure equivalent of a subscription you forgot to cancel for a service you stopped using. Except you can’t check your credit card statement because the cron costs 58 sats a day — it just haunts your EventBridge console, firing into the void, waiting for a function that will never answer.

#aws #finops #lambda #platformengineering