Monitoring Jump Start: Lambda function

A Lambda function executes code. Many things can go wrong when executing your code. You can run in a timeout, out of memory, or your code can throw exceptions. That’s why you need to add monitoring to be alerted when the Lambda function is not working as expected. We created a CloudFormation template that you can use to monitor any Lambda function in a minute.

What do I have to monitor?

Each Lambda function system sends metrics to CloudWatch that we can observe with CloudWatch Alarms. We recommend to create alarms for the following metrics:

  • Errors
  • Throttles

If a metric crosses the alarm’s threshold, you receive an alert in Slack.

Set up instructions

  1. Create the CloudFormation stack with a single click
    1. Ensure that you selected the AWS region of your Lambda function monitoring target
    2. Set the EndpointId parameter to the ID of your endpoint. You can get this value by asking @marbot for it on your Slack channel.
    3. Set the FunctionName parameter to the name of your Lambda function.
    4. Review the threshold parameters
    5. Save by clicking the Create button.
      Monitoring Jump Start: Lambda function

You made it! Your Lambda function now sends alerts to marbot if things go wrong.

Published on