This project is an example of building a CloudWatch Dashboard for Lambdas to visualize the Invocations, Concurrent Executions, Duration, and Errors. The CDK Stack provided uses the CloudWatch Metric and GraphWidget classes to visualize the graphs. The project also includes a sample Lambda functions with API Gateway integrations to showcase the dashboards. The stack adds one row for each Lambda to the Dashboard to get a single view for selected metrics and alarms to help you assess the health of your Lambda resources. Invocations, Duration, Errors, and Concurrent Execution Metrics are the selected metrics.
To get started, clone this cdk-lambda-dashboard. The repository contains a CDK App in TypeScript that deploys a CDK Stack.
To see or the edit the CloudWatch dashboard, please refer CDK App.
This topic describes some of the concepts (the why and how) behind the AWS CDK.
AWS CDK apps are composed of building blocks known as Constructs, which are composed together to form stacks and apps.
Please visit here for further referene.
To run the sample, you will need:
- An AWS Account into which you will deploy services. Be sure that you have permissions to deploy resources in the AWS Account
- CDK Setup is completed by following this guide
- Node setup is completed by following this guide
- Configure your AWS profile using the quickstart guide
To deploy the sample, perform the following:
- Clone the cdk-lambda-dashboard to your local
- Run npm installto install the necessary node modules needed for the project
- Run npm run buildto compile the project
- Run cdk synthto see the CloudFormation template
- Run cdk deployto deploy the Stack
- Upon successful deployment, you can go into CloudWatch to see the Dashboard (see/edit the cdk-lambda-dashboard.ts for Dashboard name). A sample snapshot is listed here.
You can delete the stack by running cdk destroy.
- npm run buildcompile typescript to js
- npm run watchwatch for changes and compile
- npm run testperform the jest unit tests
- cdk deploydeploy this stack to your default AWS account/region
- cdk diffcompare deployed stack with current state
- cdk synthemits the synthesized CloudFormation template
- cdk destroydelete this stack from your default AWS Account/region
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.