{"id":28440970,"url":"https://github.com/seeebiii/lambdalogs","last_synced_at":"2025-06-25T13:33:12.308Z","repository":{"id":22025929,"uuid":"94784458","full_name":"seeebiii/lambdalogs","owner":"seeebiii","description":"A CLI tool to trace AWS Lambda calls over multiple CloudWatch log groups.","archived":false,"fork":false,"pushed_at":"2023-03-06T16:57:16.000Z","size":41,"stargazers_count":21,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-06T04:08:39.858Z","etag":null,"topics":["aws","aws-cloudwatch","aws-lambda","cli","faas","lambda","logging","node","serverless"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seeebiii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-19T14:16:20.000Z","updated_at":"2023-09-08T17:26:34.000Z","dependencies_parsed_at":"2023-01-11T21:27:06.290Z","dependency_job_id":null,"html_url":"https://github.com/seeebiii/lambdalogs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/seeebiii/lambdalogs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seeebiii%2Flambdalogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seeebiii%2Flambdalogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seeebiii%2Flambdalogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seeebiii%2Flambdalogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seeebiii","download_url":"https://codeload.github.com/seeebiii/lambdalogs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seeebiii%2Flambdalogs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261883151,"owners_count":23224442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-cloudwatch","aws-lambda","cli","faas","lambda","logging","node","serverless"],"created_at":"2025-06-06T04:08:39.830Z","updated_at":"2025-06-25T13:33:12.295Z","avatar_url":"https://github.com/seeebiii.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lambdalogs\nA CLI tool to trace [AWS Lambda](https://aws.amazon.com/lambda/) calls over multiple\n[CloudWatch log groups](http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogsConcepts.html).\nThe Lambda functions are identified by searching your CloudFormation stack. You can use the existing CloudWatch filter patterns and also\nhuman-friendly time formats for filtering the log events.\n\n\n## Requirements\n* It assumes you have [setup your AWS CLI](http://docs.aws.amazon.com/cli/latest/userguide/installing.html) correctly.\n* You need to provide a CloudFormation stack name. Based on the stack, the Lambda functions and related log groups can be found and searched.\n\n\n## Install\n\n### npm\n```\nnpm install -g lambdalogs\n```\n\n### yarn\n\n```\nyarn global add lambdalogs\n```\n\n\n## Usage\n\n```\nlambdalogs\n--stack stackName\n--filter pattern\n[--region awsRegion]\n[--colorPattern pattern]\n[--color color] \n[--start timestamp] \n[--end timestamp] \n[--msgLength messageLength]\n[--poll pollDelay]\n```\n\n### Options\n* **--stack** a CloudFormation stack name which contains lambda functions\n* **--filter** a [CloudWatch filter pattern](http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). 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\"'`.\n* **--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.\n* **--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`).\n* **--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](https://www.npmjs.com/package/cli-color).\n* **--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`.\n* **--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`.\n* **--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.\n* **--poll** optional: set milliseconds to actively poll for new log events, e.g. `--poll 2000` to poll every 2 seconds. Be aware of the\n[CloudWatch Logs limits](http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html) for this approach and don't set a too low value!\nI suggest a value `\u003e 2000`, because it also takes some time that the logs arrive in CloudWatch.\n\n\n#### Time Options\n\nYou can use a human-friendly time format for `--start` and `--end` for querying the log events, for example `--start 1h` or `--start 1w`.\n\n* Seconds: `--start 15s` or `--end 15s`\n* Minutes: `--start 15m` or `--end 15m`\n* Hours: `--start 15h` or `--end 15h`\n* Days: `--start 15d` or `--end 15d`\n* Weeks: `--start 15w` or `--end 15w`\n\nMake 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.\n\n\n## Examples\n\n#### Search for logs which contain a certain log level\n```\nlambdalogs --stack your_stack_name --filter ERROR\n```\n\n\n#### Search for logs within the last 30 minutes\n```\nlambdalogs --stack your_stack_name --filter INFO --start 30m\n```\n\n\n#### Search for logs using a color pattern for a date format YYYY-MM-DD\n```\nlambdalogs --stack your_stack_name --filter INFO --colorPattern \"[0-9]{4}-[0-9]{2}-[0-9]{2}\"\n```\n\n\n#### Search for logs using a red color for the output\n```\nlambdalogs --stack your_stack_name --filter INFO --color red\n```\n\n\n#### Poll for logs every 5 seconds\n```\nlambdalogs --stack your_stack_name --filter INFO --poll 5000\n```\n\n\n## Author\n\n[Sebastian Hesse](https://www.sebastianhesse.de)\n\n\n## License\n\nMIT License\n\nCopyright (c) 2017 [Sebastian Hesse](https://www.sebastianhesse.de)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseeebiii%2Flambdalogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseeebiii%2Flambdalogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseeebiii%2Flambdalogs/lists"}