Repository navigation
Conversation
Container-image Lambdas idle for weeks are deactivated by the platform and fail their first invocation while reactivating (2026-08-27 AACRAO demo: one lost event, one all-fallback run, one failed issuance; failing calls left no runtime logs). Add a per-service EventBridge rule that invokes the function every 5 minutes with a synthetic Function-URL-shaped GET /healthz event — keeps every function active for ~zero cost, no roles, no HTTP hop. Param-gated (WarmingScheduleEnabled, default true). Provisioned concurrency was considered and rejected: it cannot target $LATEST, and the version/alias publishing it requires would drift against this raw-CFN two-pass deploy (a PC'd alias silently serving stale images), at ~$75+/month. SnapStart is zip-only.
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.
What
Every service stack gains two condition-gated resources: an EventBridge rule (
rate(5 minutes)) that invokes the function with a synthetic Function-URL-shaped (HTTP API v2)GET /healthzevent, plus the resource-based permission. Both Mangum (Python) and serverless-http (Node) treat it as a normal health check.WarmingScheduleEnabled(default"true") opts a stack out.Why this and not provisioned concurrency
The idle failure mode (2026-08-27 AACRAO demo): container-image Lambdas unused for weeks get deactivated; the first invocation fails at the platform level (502 from the Function URL, zero runtime logs) while the function reactivates, then everything works. Any periodic invocation prevents deactivation.
Provisioned concurrency also fixes it but can't target
$LATEST— it needs version/alias publishing that this raw-CFN, two-pass, per-tag deploy flow would drift against (a PC'd alias silently serving a stale image after a code deploy), and costs ~$75+/month for the fleet. SnapStart doesn't support container images. The warmer is ~121k invocations/month across 14 functions — effectively free.Verification
aws cloudformation validate-templatepasses; deployed to all 14 service stacks (template-only update, per-stackImageUripreserved) and verified live: rules firing, healthz invocations in the logs, functions staying active.Companion: #180 adds the presenter-facing warm-up reminder to the Admin UI (belt for this suspender).