All Projects → seeebiii → Lambdalogs

seeebiii / Lambdalogs

Licence: mit
A CLI tool to trace AWS Lambda calls over multiple CloudWatch log groups.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Lambdalogs

Apex
Old apex/apex
Stars: ✭ 20 (+11.11%)
Mutual labels:  aws, serverless, aws-lambda, lambda, faas
Serverless Es Logs
A Serverless plugin to transport logs to ElasticSearch
Stars: ✭ 51 (+183.33%)
Mutual labels:  aws, serverless, aws-lambda, lambda, logging
Components
The Serverless Framework's new infrastructure provisioning technology — Build, compose, & deploy serverless apps in seconds...
Stars: ✭ 2,259 (+12450%)
Mutual labels:  aws, serverless, aws-lambda, lambda, faas
Node Lambda Log
Basic logging mechanism for Node 6.10+ Lambda Functions
Stars: ✭ 115 (+538.89%)
Mutual labels:  aws, serverless, aws-lambda, lambda, logging
Apilogs
Easy logging and debugging for Amazon API Gateway and AWS Lambda Serverless APIs
Stars: ✭ 216 (+1100%)
Mutual labels:  aws, aws-lambda, lambda, logging
Aws Lambda Power Tuning
AWS Lambda Power Tuning is an open-source tool that can help you visualize and fine-tune the memory/power configuration of Lambda functions. It runs in your own AWS account - powered by AWS Step Functions - and it supports three optimization strategies: cost, speed, and balanced.
Stars: ✭ 3,040 (+16788.89%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Algnhsa
AWS Lambda Go net/http server adapter
Stars: ✭ 226 (+1155.56%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Grant
OAuth Proxy
Stars: ✭ 3,509 (+19394.44%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Refunc
A lib make building AWS Lambda compatible layer easily
Stars: ✭ 144 (+700%)
Mutual labels:  aws, serverless, lambda, faas
Aws Serverless Samfarm
This repo is full CI/CD Serverless example which was used in the What's New with AWS Lambda presentation at Re:Invent 2016.
Stars: ✭ 271 (+1405.56%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Serverless Rust
⚡ 🦀 a serverless framework plugin for rustlang applications
Stars: ✭ 386 (+2044.44%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Lambda Packages
Various popular python libraries, pre-compiled to be compatible with AWS Lambda
Stars: ✭ 713 (+3861.11%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Serverlessish
Run the same Docker images in AWS Lambda and AWS ECS
Stars: ✭ 177 (+883.33%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Serverless Chrome
🌐 Run headless Chrome/Chromium on AWS Lambda
Stars: ✭ 2,625 (+14483.33%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Serverless Next.js
⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
Stars: ✭ 2,977 (+16438.89%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Aws Auto Cleanup
Open-source application to programmatically clean your AWS resources based on a whitelist and time to live (TTL) settings
Stars: ✭ 276 (+1433.33%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Archive aws Lambda Go
A fast and clean way to execute Go on AWS Lambda.
Stars: ✭ 710 (+3844.44%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Serverless Plugin Warmup
Keep your lambdas warm during winter. ♨
Stars: ✭ 814 (+4422.22%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Webiny Js
Enterprise open-source serverless CMS. Includes a headless CMS, page builder, form builder and file manager. Easy to customize and expand. Deploys to AWS.
Stars: ✭ 4,869 (+26950%)
Mutual labels:  aws, serverless, aws-lambda, lambda
Spark On Lambda
Apache Spark on AWS Lambda
Stars: ✭ 137 (+661.11%)
Mutual labels:  aws, serverless, aws-lambda, lambda

lambdalogs

A CLI tool to trace AWS Lambda calls over multiple CloudWatch log groups. The Lambda functions are identified by searching your CloudFormation stack. You can use the existing CloudWatch filter patterns and also human-friendly time formats for filtering the log events.

Requirements

  • It assumes you have setup your AWS CLI correctly.
  • You need to provide a CloudFormation stack name. Based on the stack, the Lambda functions and related log groups can be found and searched.

Install

npm

npm install -g lambdalogs

yarn

yarn global add lambdalogs

Usage

lambdalogs
--stack stackName
--filter pattern
[--region awsRegion]
[--colorPattern pattern]
[--color color] 
[--start timestamp] 
[--end timestamp] 
[--msgLength messageLength]
[--poll pollDelay]

Options

  • --stack a CloudFormation stack name which contains lambda functions
  • --filter a CloudWatch filter pattern. If you need to place your filter pattern into double quotes because of non alphanumeric or underscore characters, you have to enclose them by single quotes. Like this: '"SPECIAL-CHAR"'.
  • --region optional: you can set the AWS region for your CloudFormation stack and CloudWatch logs. By default the region configured in your AWS CLI is used. As a fallback 'us-east-1' is used.
  • --colorPattern optional: for a colored output, you can set a regex pattern which tries to match your messages and colors the matched output. By default only the timestamp of the log event is colored (see --color).
  • --color optional: for a colored output, you can set the color of the matched pattern (see --colorPattern). The color must be supported by cli-color.
  • --start optional: you can set the start time to begin with the search for log events. By default the last 15 minutes from now will be searched, so start is equal to Date.now() - 15*60*1000. See also --end.
  • --end optional: you can set the end time to stop with the search for log events. By default the last 15 minutes from now will be searched, so end is equal to Date.now(). See also --start.
  • --msgLength optional: you can set a maximum length for the message output. This means only the first X characters will be printed. 0 means all characters of a message are printed. By default this limit is set to 350. This is useful to keep an overview if your logs contain lots of data.
  • --poll optional: set milliseconds to actively poll for new log events, e.g. --poll 2000 to poll every 2 seconds. Be aware of the CloudWatch Logs limits for this approach and don't set a too low value! I suggest a value > 2000, because it also takes some time that the logs arrive in CloudWatch.

Time Options

You can use a human-friendly time format for --start and --end for querying the log events, for example --start 1h or --start 1w.

  • Seconds: --start 15s or --end 15s
  • Minutes: --start 15m or --end 15m
  • Hours: --start 15h or --end 15h
  • Days: --start 15d or --end 15d
  • Weeks: --start 15w or --end 15w

Make sure that you don't set the --end time before --start. I.e. this is not possible: --start 1h --end 1d, but --start 1d --end 1h would be OK.

Examples

Search for logs which contain a certain log level

lambdalogs --stack your_stack_name --filter ERROR

Search for logs within the last 30 minutes

lambdalogs --stack your_stack_name --filter INFO --start 30m

Search for logs using a color pattern for a date format YYYY-MM-DD

lambdalogs --stack your_stack_name --filter INFO --colorPattern "[0-9]{4}-[0-9]{2}-[0-9]{2}"

Search for logs using a red color for the output

lambdalogs --stack your_stack_name --filter INFO --color red

Poll for logs every 5 seconds

lambdalogs --stack your_stack_name --filter INFO --poll 5000

Author

Sebastian Hesse

License

MIT License

Copyright (c) 2017 Sebastian Hesse

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].