Measures the warm starts in total invocation

Returns the percentage of warm starts in total invocations.

CloudWatch Log Insights snippet that returns a report for the percentage of warm starts

filter @type = "REPORT" and @message not like /(?i)(Init Duration)/
 | stats
  avg(@duration) as Average,
  pct(@duration, 99) as NinetyNinth,
  pct(@duration, 95) as NinetyFifth,
  pct(@duration, 90) as Ninetieth
by bin(1m)
                                


< Back to snippets

GitHub icon View this snippet on GitHub


Running the CloudWatch snippet

Click on the button below to open up the snippet directly into your AWS account.

Manually running the CloudWatch snippet

2. Select Logs, and then choose Logs Insights.
3. In the Select log group(s) drop down, choose one or more log groups to query.
4. Copy snippet into query text area.
5. Click "Run Query"

Created by:

Julian Wood

Julian Wood

Julian is a developer advocate at AWS who loves helping developers learn how serverless and AI technologies can transform the way they build and run applications in the cloud.

Follow on LinkedIn