how to view aws log real time (like tail -f)

后端 未结 11 673
执笔经年
执笔经年 2021-01-31 01:13

I can view the log using the following command.

aws logs get-log-events --log-group-name groupName --log-stream-name streamName --limit 100

wha

11条回答
  •  终归单人心
    2021-01-31 01:58

    I've just discovered cwtail and it works well (to watch a lambda function's CloudWatch logs).

    To install:

    npm install -g cwtail
    

    To list log groups:

    cwtail -l
    

    Then, once you've picked which log group to 'tail':

    cwtail -f /aws/lambda/ExampleFunction
    

提交回复
热议问题