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 install
to install the necessary node modules needed for the project - Run
npm run build
to compile the project - Run
cdk synth
to see the CloudFormation template - Run
cdk deploy
to 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 build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation templatecdk destroy
delete 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.