Log::Log4perl::Appender::CloudWatchLogs and aws-logs command
37
aws-logs is a command-line tool for working with Amazon CloudWatch Logs.
It is distributed as part of Log::Log4perl::Appender::CloudWatchLogs and provides a convenient way to inspect, follow, and manage CloudWatch log groups and streams without installing the Perl distribution and its dependencies locally.
The container includes aws-logs together with the generated Amazon::API::CloudWatchLogs service class required to communicate with AWS.
Typical uses include:
For example:
docker run --rm \
-v "$HOME/.aws:/root/.aws:ro" \
-e AWS_PROFILE \
-e AWS_REGION \
openbedrock/aws-logs \
aws-logs list-groups
Follow the logs for a Lambda function:
docker run --rm \
-v "$HOME/.aws:/root/.aws:ro" \
-e AWS_PROFILE \
-e AWS_REGION \
openbedrock/aws-logs \
aws-logs -g /aws/lambda/my-function -t 30m --follow get-stream
aws-logs periodically rediscovers streams while following, allowing it to pick up new Lambda execution environments after the command has already started.
It can also remove stale log streams whose events have already aged out:
docker run --rm \
-v "$HOME/.aws:/root/.aws:ro" \
-e AWS_PROFILE \
-e AWS_REGION \
openbedrock/aws-logs \
aws-logs -g /aws/lambda/my-function prune-streams 30d
Use --dryrun to preview which streams would be removed.
For help:
docker run --rm openbedrock/aws-logs aws-logs -h
The underlying Perl distribution is available as Log::Log4perl::Appender::CloudWatchLogs.
Content type
Image
Digest
sha256:9300ab827…
Size
50 MB
Last updated
about 4 hours ago
docker pull rlauer/aws-logs