DEV Community

Cover image for Monitoring AWS Lambda Functions With CloudWatch

Monitoring AWS Lambda Functions With CloudWatch

Frank Rosner on October 22, 2018

This blog post is part of my AWS series: Infrastructure as Code - Managing AWS With Terraform Deploying an HTTP API on AWS using Lambda and API G...
Collapse
 
visusnet profile image
Alexander Müller

Hi Frank!

The pattern seems to be out-dated. AWS seems to have added "Init Duration: ms". This is our updated pattern.

[report_name="REPORT", request_id_name="RequestId:", request_id_value, duration_name="Duration:", duration_value, duration_unit="ms", billed_duration_name_1="Billed", bill_duration_name_2="Duration:", billed_duration_value, billed_duration_unit="ms", memory_size_name_1="Memory", memory_size_name_2="Size:", memory_size_value, memory_size_unit="MB", max_memory_used_name_1="Max", max_memory_used_name_2="Memory", max_memory_used_name_3="Used:", max_memory_used_value, max_memory_used_unit="MB", init_duration_name1="Init", init_duration_name2="Duration:", init_duration_value, init_duration_unit="ms"]

Thank you!

Collapse
 
frosnerd profile image
Frank Rosner

You are right! AWS added the init duration to the logs and that's why the pattern broke. Good catch :)

Thanks for sharing the updated pattern.

Collapse
 
mbarlocker profile image
Matthew Barlocker

Great writeup, Frank.

A colleague recently did a similar writeup that covers some of the same information, and then goes into a little more detail around logging from Lambda and how to reason about the metrics themselves. It's called How to Monitor AWS Lambda with CloudWatch. For your readers, it's a good follow-on to your writeup here.