[{"data":1,"prerenderedAt":28},["ShallowReactive",2],{"snippet-cloudwatch-insight-lambda-memory-debugger":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-memory-debugger.json","Lambda memory report to tell you if you over provisioned",[7],"content\u002Fcontributors\u002Fdavid-boyne.json","Returns a report that looks at innvocations as calculates if you are using the correct amount of memory or not","json",{"template":11},{"repoURL":12},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-snippets\u002Ftree\u002Fmain\u002Fcloudwatch-insight-lambda-memory-debugger",{"headline":14,"text":15},"How it works",[16],"Cloudwatch Log Insights snippet that returns a report that shows you the smallest, average and max memory used across innvocations, as well as the amount of memory over provisioned",null,{},[20],"lambda-event-functions",[22],{"language":23,"code":24},"css","filter @type = \"REPORT\"\n| stats max(@memorySize \u002F 1000 \u002F 1000) as provisonedMemoryMB,\n  min(@maxMemoryUsed \u002F 1000 \u002F 1024) as smallestMemoryRequestMB,\n  avg(@maxMemoryUsed \u002F 1024 \u002F 1024) as avgMemoryUsedMB,\n  max(@maxMemoryUsed \u002F 1024 \u002F 1024) as maxMemoryUsedMB,\n  provisonedMemoryMB - maxMemoryUsedMB as overProvisionedMB","snippets\u002Fcloudwatch-insight-lambda-memory-debugger","CloudWatch Logs Insights","jGUxdTo70aOORvy1C_YFGrPKDFHKsQPkIeSyVWIcZEQ",1792578864164]