LoginSignup
0
0

More than 5 years have passed since last update.

CloudWatch Log の filter-log-events が遅い時に describe-log-streams を併用して対応する方法

Posted at
aws logs describe-log-streams --log-group-name "/aws/batch/job" --log-stream-name-prefix "AWS_BATCH_DEFINITION_HOGE/default"

で得た log-streams-names を↓で space 区切りで list して filter-log-events をする。
filter-log-events の --log-stream-name-prefix は大量に log-stream-names があると現実的な速度で動作しないので、このような手法が有効となる。

aws logs filter-log-events --log-group-name "/aws/batch/job" --log-stream-names "AWS_BATCH_DEFINITION_HOGE/default/UUID4" "AWS_BATCH_DEFINITION_HOGE/default/UUID4"
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0