λ沢.dev

lambdasawa cheatsheet

CloudWatch Logs

Insights query

cloudwatch-logs-query

cloudwatch-logs-query 2022-01-02T03:04:05Z 2023-01-02T03:04:05Z /aws/lambda/foo 'fields @message | limit 5'

utern

utern --no-log-stream --filter '-"START RequestId" -"END RequestId" -"REPORT RequestId"' /aws/lambda/foo

cw

github

ロググループをまとめて削除

aws logs describe-log-groups --max-items 1000 |\
  jq -r '.logGroups[] | .logGroupName | select(test("irisawa"))' |\
  xargs -n 1 aws logs delete-log-group --log-group-name