Logstreem
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

FieldValue
aws.request_idThe Lambda request id — the join key for a single invocation
aws.function_nameFunction name
aws.function_versionPublished version or $LATEST
aws.cold_starttrue on the first invocation of a sandbox
aws.duration_msBilled duration
aws.memory_used_mbPeak memory
Cold starts by function
read top to bottom
1['lambda-prod']
2| where _time > ago(24h)
3| summarize
4 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