AWS Lambda
AWS Lambda
A layer that ships function logs without touching your handler.
The Logstreem extension runs alongside your function, reads the Logs API stream and forwards it. No code change and no CloudWatch dependency.
aws lambda update-function-configuration \
--function-name checkout-api \
--layers arn:aws:lambda:us-east-1:451483290750:layer:logstreem-extension:19 \
--environment "Variables={LOGSTREEM_TOKEN=$LOGSTREEM_TOKEN,LOGSTREEM_DATASET=lambda-prod}"What the extension adds
| Field | Value |
|---|---|
aws.request_id | The Lambda request id — the join key for a single invocation |
aws.function_name | Function name |
aws.function_version | Published version or $LATEST |
aws.cold_start | true on the first invocation of a sandbox |
aws.duration_ms | Billed duration |
aws.memory_used_mb | Peak memory |
Cold starts by function
read top to bottom
1['lambda-prod']2| where _time > ago(24h)3| summarize4 invocations = count(),5 cold = countif(['aws.cold_start'] == true),6 p95 = percentile(['aws.duration_ms'], 95)7 by ['aws.function_name']8| extend cold_pct = round(100.0 * cold / invocations, 1)9| order by cold_pct desc