Forum Discussion

Brandon's avatar
7 years ago

AWS Lambda Alias

GX2WXT

A single Lambda function might have several versions.  The default Lambda datasource monitors and alerts on the aggregate performance of each Lambda function.  Using the Alias functionality in AWS, this datasource returns CloudWatch metrics specifically for the versions to which you have assigned aliases, allowing you to customize alert thresholds or compare performance across different versions of the same function.  This datasource does not automatically discover aliases and begin monitoring them (as this could very quickly translate into several Aliases being monitored and drive up your CloudWatch API bill). Instead, add only the Aliases you want monitored by adding the device property "lambda.aliases" either to individual Lambda functions or at the group level if you're using the same Alias across several lambda functions.  To add more than one, simply list them separated with a single space - e.g: "Prod QA01 QA02".  If an alias does not exist, no data will be returned.

This datasource is otherwise a clone of the existing AWS_Lambda datasource with the default alert thresholds.

  • I like it. I made two modifications to our local copy:
     - disabled Active Discovery
     - changed the metric path from Resource=##WILDVALUE## to Resource=##system.aws.resourceid##:##WILDVALUE##

    Since adding a property is a manual step anyway, I figured keeping this LM resource as "cloudy" as possible better suited our needs. The scripted Active Discovery never created the DSI for me and that's probably because I didn't assign a collector to the monitor the LM Cloud resource.