Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
serverless-plugin-lambda-insights
Advanced tools
A Serverless Framework Plugin allowing to enable Lambda Insights for entire Serverless stack or individual functions
A Serverless Framework Plugin allowing to enable Lambda Insights
Enables AWS Lambda Insights (https://aws.amazon.com/blogs/mt/introducing-cloudwatch-lambda-insights/) for the entire Serverless stack functions or individual functions.
CloudWatch Lambda Insights is a monitoring and troubleshooting solution for serverless applications running on AWS Lambda. The solution collects, aggregates, and summarizes system-level metrics including CPU time, memory, disk, and network. It also collects, aggregates, and summarizes diagnostic information such as cold starts and Lambda worker shutdowns to help you isolate issues with your Lambda functions and resolve them quickly.
This Plugin requires a Serverless Framework version of >= 2.0.0.
npm install --save-dev serverless-plugin-lambda-insights
add Plugin to your serverless.yml
in the plugins section.
Example serverless.yml
:
provider:
name: aws
plugins:
- serverless-plugin-lambda-insights
functions:
hello:
handler: handler.hello
lambdaInsights: true
The plugin will enable Lambda Insights by adding a Lambda Layer (see Layer Details and Versions) and adding necessary permissions using the arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy
as a AWS IAM Managed Policy.
You can check in your AWS Console:
go to AWS Lambda -> select your Lambda function -> Configuration tab -> Monitoring tools ->
"CloudWatch Lambda Insights".
If lambdaInsights
validated to true
for a function,
the checkbox will be checked.
Example serverless.yml
:
service: your-great-sls-service
provider:
name: aws
stage: dev
plugins:
- serverless-plugin-lambda-insights
functions:
mainFunction: #inherits tracing settings from "provider"
lambdaInsights: true #enables Lambda Insights for this function
handler: src/app/index.handler
secondFunction: #inherits tracing settings from "provider"
lambdaInsights: false #disables Lambda Insights for this function, will overrule custom settings
handler: src/app/index.handler
custom:
lambdaInsights:
defaultLambdaInsights: true #enables Lambda Insights for all your functions, if
attachPolicy: false #explicitly disable auto attachment Managed Policy.
lambdaInsightsVersion: 14 #specify the Layer Version
You can find an example in the example folder of this repository. Run it with the following command.
cd example; serverless deploy
This will deploy a hello-world Lambda function with Lambda Insights enabled.
This is your repo - just go head and create a pull request. See also CONTRIBUTING for more introductions.
Some open Ideas and Tasks:
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.
[2.0.0] 2023-04-08
FAQs
A Serverless Framework Plugin allowing to enable Lambda Insights for entire Serverless stack or individual functions
The npm package serverless-plugin-lambda-insights receives a total of 36,625 weekly downloads. As such, serverless-plugin-lambda-insights popularity was classified as popular.
We found that serverless-plugin-lambda-insights demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.