tail
command for CloudWatch Logs.
Download from releases.
Or
go get -u github.com/nabeken/go-cwtail/cwtail
Usage:
cwtail [OPTIONS]
Application Options:
-f wait for additional data to be appended to the log stream
-n= the number of logs to fetch (20)
-d= interval for polling the log streams (1s)
Help Options:
-h, --help Show this help message
You should setup a credential for AWS SDK.
Even if you use the instance-profile, you must at-least set AWS_REGION
variable.
export AWS_REGION=ap-northeast-1
See SDK documentation for more details.
cwtail can tail multiple streams like this:
cwtail -f \
log-group@log-stream-1 \
log-group@log-stream-2