Realtime streaming aws cloudwatch on terminal
Sometime when we deploy our app on ElasticBeanstalk or testing our lambda function, we want to check the log for debugging. Using AWS CloudWatch, we can download and see the logs from various AWS Service. However, sometime we want to check the logs realtime on our terminal. Luckily, there is a CLI app for that.
awslogs is a cli tool for querying and streaming from CloudWatch logs.
Installation
pip install awslogs
Usage
awslogs groups: List existing groupsawslogs streams GROUP: List existing streams withingGROUPawslogs get GROUP [STREAM_EXPRESSION]: Get logs matchingSTREAM_EXPRESSIONinGROUP.
Example
awslogs get /aws/lambda/aws-lambda-image ALL --watch

Leave a Comment