awslogs icon indicating copy to clipboard operation
awslogs copied to clipboard

Leverage --log-stream-name-prefix when describing log streams

Open dwikle opened this issue 6 years ago • 0 comments

It appears that awslogs uses describe-log-streams to fetch all streams for a given log group, and then does filtering by the stream expression. For log groups with a large number of streams, this can take a significant time to complete. For example, AWS Batch places all logs for all jobs in the same log group; describing them all without a prefix match can take many minutes.

In instances where I know the exact stream name, or a prefix, it would be nice if awslogs could leverage the --log-stream-name-prefix option on the AWS api. I'd suggest a flag to be passed to get which would indicate that the log_stream_name should be interpreted as a prefix and be passed through to --log-stream-name-prefix.

dwikle avatar Jul 29 '19 16:07 dwikle