[{"data":1,"prerenderedAt":28},["ShallowReactive",2],{"snippet-cloudwatch-insight-lambda-cold-start-invocations-byfunction":3},{"id":4,"title":5,"contributors":6,"description":8,"extension":9,"gitHub":10,"introBox":13,"languages":17,"meta":18,"resources":17,"services":19,"snippets":21,"stem":25,"tags":17,"type":26,"__hash__":27},"snippets\u002Fsnippets\u002Fcloudwatch-insight-lambda-cold-start-invocations-byfunction.json","Measures the cold starts in total invocation including function name and memory size",[7],"content\u002Fcontributors\u002Fjulian-wood.json","Measures the cold starts in total invocation including function name and memory size.","json",{"template":11},{"repoURL":12},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-snippets\u002Ftree\u002Fmain\u002Fcloudwatch-insight-lambda-cold-start-invocations-byfunction",{"headline":14,"text":15},"How it works",[16],"CloudWatch Log Insights snippet that measures the cold starts in total invocation including function name and memory size",null,{},[20],"lambda-event-functions",[22],{"language":23,"code":24},"css","filter @type = \"REPORT\" and @message like \u002F(?i)(Init Duration)\u002F\n|parse @message \u002F^REPORT.*Init Duration: (?\u003CinitDuration>.*) ms.*\u002F\n| parse @log \u002F^.*\u002Faws\u002Flambda\u002F(?\u003CfunctionName>.*)\u002F\n| fields @memorySize \u002F 1000000 as memorySize\n| stats count() as coldStarts, avg(initDuration) as avgInitDuration, max(initDuration) as maxInitDuration\nby functionName, memorySize\n","snippets\u002Fcloudwatch-insight-lambda-cold-start-invocations-byfunction","CloudWatch Logs Insights","J6eA27fom-Btj1qeC1odUCbEPnyult2vIHeqaHLFnvs",1792665262841]