I would like to build a custom dashboard that contains various metrics. As an example I want to use the Lambda Invocations: I want to see the invocations for each lambda function as a line graph. My problem: Lambda functions are regularly deleted and new ones created in this account. Since the name of the Lambda function must be specified in the widget, it is not clear to me how I should keep these widgets up to date. Do I really have to adjust the widgets after each deployment?
I am aware that I can see this value via the Automatic Dashboards, but I need numerous other metrics which I want to arrange individually, etc.
{
"widgets": [
{
"height": 2,
"width": 6,
"y": 2,
"x": 0,
"type": "text",
"properties": {
"markdown": "# Lambda metrics"
}
},
{
"height": 6,
"width": 12,
"y": 4,
"x": 0,
"type": "metric",
"properties": {
"metrics": [
[ "AWS/Lambda", "Invocations", "FunctionName", "*", { "label": "Sum", "region": "eu-central-1" } ], // This is not working
[ "...", "myLambdaFunctionName", { "region": "eu-central-1" } ] // Thats the way to do it
],
"view": "timeSeries",
"title": "Invocations: Sum",
"region": "eu-central-1",
"period": 300,
"stat": "Sum"
}
}
]
}