1
0
Fork
You've already forked awsutils
0
AWS utilities
  • Python 100%
2025年03月04日 22:17:49 -08:00
.gitignore Initial commit - 'cwlogs' and a basic '.gitignore' 2023年04月23日 22:01:58 -07:00
cwlogs Add paging of describe_log_groups() results 2023年06月05日 11:27:26 -07:00
freetier New addition: "freetier"; Also adding a README[.org] file 2025年03月04日 22:17:49 -08:00
README.org New addition: "freetier"; Also adding a README[.org] file 2025年03月04日 22:17:49 -08:00

README

cwlogs

An attempt to list and view/tail the CloudWatch Logs.

Quickstart

Run cwlogs --help for the complete list of options.

Background

I wrote this to see if I could. There are quite likely faster or better ways to do this from the command line.

When you add --debug 1 the command will track some of the API calls and give a summary at the end, like this:

 API queries sent: 42

This was done because I was scratching my head about the number of calls that were needed to walk the log data, which may require more calls when going in one direction than the other. This is also why there is a --reverse option.

Examples

List the logs for an account in a particular region

 cwlogs --profile test-account --region us-east-1 --list

Get the most recent lines from a a certain Lambda, skipping the Lambda-noise itself

This will give you the 50 most recent lines, grouping the lines per date/time, while skipping lines with messages like INIT_START ..., REPORT RequestId: ..., etc.

 cwlogs --profile test-account --region us-east-1 -t /aws/lambda/report -e 50 --noise --group

freetier

Check the freetier usage information of one or more accounts.

Quickstart

Run freetier --help for the complete list of options.