Registry / aws / lambda-warmer-py

lambda-warmer-py

JSON →
library0.6.0pypypiunverified

A Python decorator to keep AWS Lambda functions warm and monitor cold starts. The decorator intercepts warmer invocations (typically from a CloudWatch Event) and returns a no-op response, while measuring cold start duration. Current version 0.6.0. Release cadence is low, last updated in 2020.

pip install lambda-warmer-py
INSTALL
IMPORT
SIG · LAMBDA-WARMER-PY
L
lambda-warmer-py
awspythonv0.6.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

warmer
from lambdawarmer import warmer
from lambda_warmer import warmer

Decorate your Lambda handler with @warmer to handle warm-up pings and log cold start metrics.

from lambda_warmer import warmer @warmer def handler(event, context): return {'statusCode': 200, 'body': 'Hello World'}
Debug
Known issues
gotchaThe warmer decorator must be applied to the handler function that Lambda calls directly. If you wrap the handler inside another decorator, the warmer may not intercept invocations correctly.
fix
Ensure @warmer is the outermost decorator (closest to the function definition) or applied directly to the raw handler.
affects: all
deprecatedThe library uses boto3 to publish custom metrics to CloudWatch, but this requires IAM permissions (cloudwatch:PutMetricData). Without proper permissions, the decorator silently fails.
fix
Attach an IAM policy granting cloudwatch:PutMetricData to your Lambda execution role, or override the metric publishing logic.
affects: all
Upgrade
Version history
0.6.0latest on PyPI · released Nov 23, 2019
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
16
Resources
lambda-warmer-py — pip install lambda-warmer-py · libregistry