Pulls data from a specified set of log streams in cloudwatch logs
To query CloudWatch Logs with this tool, you'll need to have...
- AWS credentials set up either as environment variables (as in the example below) or in a aws credential file
- A start and end time for your search formatted in YYYY-MM-DD HH:MM:SS format
$ export AWS_ACCESS_KEY_ID=accessKeyId
$ export AWS_SECRET_ACCESS_KEY=secretAccessKey
$ cw-search LogGroup1:LogStream1,[LogStreamN] -s "2015-04-07 00:00:00" -e "2015-04-07 23:59:59"
Can filter the fields in json:
$ cw-search --format json --fields name.first,address.country,address.state LogGroup:LogStream
{"name": {"first": "Thomas"}, "address": {"country": "United States", "state": "NC"}}
for other things, pipe to grep (for now):
cw-search LogGroup:LogStream | grep --color 'search str'