Skip to content

Lambda function memory exhaustion alert setup

0

Hi,

We are looking for guidance for the scenario below.

We want to setup an alert on lambda function when max memory usage goes above allocated memory but do not want to add extra cost here either through lambda insights or metric filter custom metrics. Could you please suggest how we could achieve this.

2 Answers
1

I am not aware of any other way than lambda insights

AWS
answered 2 years ago
0

Hi Mayank,

you want to monitor memory usage of some lambda functions and you say you are not seeing the Memory Used metric for your lambda functions.

This is because the memory usage metric is not part of the basic monitoring provided by Lambda. You need to activate Lambda Insights on the function(s) you want to monitor to get this metric. See the list of metrics collected by Lambda Insights.

If you turn on Lambda Insights, the new metric will not be added to the Lambda namespace, they will appear in a namespace called LambdaInsights that will be listed as a custom namespace. To turn on Lambda Insights (or to turn it off if later you don't need it anymore), open the function you want in the Lambda console, go to the Configuration tab, select the Monitoring and Operation Tools entry, and click on the Edit button for the Additional monitoring tools block: CloudWatch Lambda Insights will be listed as the second option. You can also of course use CLI or other automation tools to turn on or off Lambda Insights (see CLI example here, and pages in the same part of the doc will show you other options)

AWS
answered 2 years ago
  • Hi Jsc,

    Thanks for responding.

    I am aware of the Lambda Insights part, but it will add extra cost to me for 8 custom metrics per function. Could you please suggest some alternatives to track memory usage without adding cost?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.