Template built by
Telegraf Plugins used:
- 1 Dashboard:
- 1 Variable:
If you have your InfluxDB credentials configured in the CLI, you can install this template with:
AWS Lambda Template dashboard
AWS Lambda is a serverless compute platform that lets developers run code without having to worry about managing or provisioning servers. Lambda functions respond to requests and can scale automatically to handle variable traffic loads with the developer only paying for computing resources billed by the millisecond, instead of having to pay upfront for server capacity. AWS Lambda functions can be triggered by 200 different AWS services as well as HTTP requests from external services.
Some common use cases for AWS Lambda are file processing to store uploaded content into object storage with something like AWS S3. Stream processing is another common use case where new real-time data can be processed at any scale by a Lambda function. AWS Lambda is also commonly used as a backend service for IoT or mobile applications.
Why monitor your AWS Lambda functions with InfluxDB
By using this InfluxDB template to monitor your AWS Lambda functions you can easily keep track of things like the number of function invocations, your Lambda request error statistics, and throttling statistics. Using InfluxDB, you can easily set alerts to make sure that your Lambda functions are working properly. You could also set alerts based on usage rates. While the ability to scale massively without worrying about performance drops is the main selling point of AWS Lambda, in some cases, you might run into cost issues if that scaling gets out of control. With InfluxDB, you can set alerts to prevent potential cost overruns.
How to use AWS Lambda Template
Once your InfluxDB credentials have been properly configured in the CLI, you can install the AWS Lambda Template using the Quick Install command.
Once installed you will need to generate some sample data. To do this you’ll first need to create a lambda function in your AWS account. You can either create your own or use the basic sample lambda function found in this template’s GitHub repository. You’ll then need to create an InfluxDB Cloud account or install InfluxDB version 2 on your server or locally on your computer. Next you will need to configure the Telegraf AWS CloudWatch plugin, using the AWS/Lambda namespace. For more info on this process, check out the AWS CloudWatch repo. To generate sample data, you can now use the sample requests.sh file in the template repo by passing your lambda function’s URL as a parameter.
Key AWS Lambda metrics to monitor
Some of the most important AWS Lambda metrics that you should proactively monitor include:
- Total function invocations
- Total error rate
- Invocations per function
- Duration per function
- Errors per function
- Throttle count
Quickly set up an AWS monitoring dashboard with the InfluxDB CloudWatch template. This template uses the Telegraf CloudWatch Plugin to give you access to all AWS metrics.