|Part of the core team for the middy middleware engine for Node.js Lambda functions.|
The lumigo-cli is a collection of helpful commands for working with AWS Lambda and just AWS in general.
Here are a few of the more popular commands:
- analyze-lambda-cold-starts: analyze cold start count and duration for all functions in all regions
- analyze-lambda-cost: estimate Lambda function costs in all regions
- powertune-lambda: find the optimal Lambda memory size for performance, cost, or the best balance of the two
- replay-sqs-dlq: replays messages in a SQS DLQ to another SQS queue/SNS topic/Kinesis stream
- tail-dynamodb: tail events going into a DynamoDB stream
- tail-eventbridge-bus: tail events recorded by an EventBridge bus
- tail-eventbridge-rule: tail events recorded by an EventBridge rule
- tail-kinesis: tail events going into a Kinesis stream
- tail-sns: tail messages published to a SNS topic
- tail-sqs: tail messages published to a SQS queue
- switch-profile: easily switch between different named AWS profiles (configured via aws configure)
dazn-lambda-powertools is a collection of tightly integrated tools, including:
- a correlation-ids package for recording correlation IDs.
- a logger package that supports structured logging and would automatically include the current correlation IDs.
- a collection of middy middlewares for extracting correlation IDs from the invocation event, sample logging, logging timeout errors, stopping infinite recursions and obfuscation.
- a collection of client libraries for HTTP, CloudWatchEvents, EventBridge, SNS, SQS, Kinesis, Step Functions and Lambda, all of which knows how to forward the current correlation IDs on.
- a wrapper which applies and configures the aforementioned middlewares to your handler.
Serverless Application Repository apps
- lambda-janitor: cron job to delete old, unused versions of all Lambda functions in the region to free up storage space.
- auto-subscribe-log-group-to-arn: subscribes new and existing CloudWatch log groups to a Lambda function, Kinesis stream, or Firehose delivery stream by ARN.
- auto-set-log-group-retention: updates the retention policy for new and existing CloudWatch log groups to a specified number of days to reduce CloudWatch Logs cost.
- async-custom-metrics: lets you record custom metrics by writing to stdout (which is recorded in CloudWatch Logs) which is then parsed and forwarded to CloudWatch metrics as custom metrics.
- measure-cold-start: lets you measure the cold start of your function. It’s best to use this SAR through the lumigo-cli‘s measure-lambda-cold-starts command, which manages the deployment of this SAR and keeps it up-to-date.
- propagate-cfn-tags: propagates CloudFormation tags to resources that are not automatically tagged, e.g. CloudWatch log groups.
- autodeploy-layer: automatically deploys a Lambda layer to all new and existing functions in the region. Supports opt-in and opt-out via function tags.
- lambda-invocation-cfn-custom-resource: supports CloudFormation custom resource to invoke a Lambda function during deployment.
- dazn-lambda-powertools: deploys all the packages from DAZN lambda powertools (see above) as one Lambda layer in your account.
- cloudwatch-alarms-macro: deploys a CloudFormation macro that auto-generates CloudWatch Alarms for you based on the resources you have in a CloudFormation template.
- lambda-timeout-metric: automatically create metric filters for Lambda log groups to report function timeouts as a custom metric.
Serverless framework plugins
- serverless-step-functions: lets you define Step Functions state machines in the serverless.yml.
- serverless-apigateway-service-proxy: supports AWS service integrations with API Gateway.
- serverless-plugin-extrinsic-functions: gives you the ability to use additional Fn:: functions such as StartsWith, Substring, etc.
- serverless-lumigo: makes it easy to install the Lumigo tracer to your functions.
- serverless-sns-to-sqs-events: makes it easy to configure SNS to SQS to Lambda as a single event source.
I have published many demo apps with accompanying blog posts to illustrate techniques for building serverless applications, such as: