awslogs
TLDR
Stream CloudWatch logs
SYNOPSIS
awslogs command [options] log-group
DESCRIPTION
awslogs is a command-line tool for querying and streaming AWS CloudWatch Logs. It provides a simple interface for viewing logs from Lambda functions, EC2 instances, ECS containers, and other AWS services.
The tool offers real-time log streaming and time-based filtering without using the AWS Console.
PARAMETERS
get log-group
Fetch logs from log groupgroups
List available log groupsstreams log-group
List streams in log group--watch, -w
Stream logs in real-time--start=time
Start time (e.g., '2h ago', '2023-01-01')--end=time
End time--filter-pattern=pattern
CloudWatch filter pattern--profile=profile
AWS profile to use--region=region
AWS region--no-group
Don't group streams together
TIME SPECIFICATIONS
- 2h ago - 2 hours ago
- 30m ago - 30 minutes ago
- 2d ago - 2 days ago
- 2023-01-01 - Specific date
- 2023-01-01 10:30 - Specific datetime
CAVEATS
Requires AWS credentials configured. Large log queries may be slow. CloudWatch Logs costs apply. Time specifications are in UTC. --watch can consume API calls quickly.
HISTORY
awslogs was created by Jorge Bastida around 2015 to provide a better command-line experience for viewing CloudWatch Logs compared to the official AWS CLI.


