I am using AWS Lambda for my application. For logs, I have to see in UI only, which I really don't like to see. Is there a way that I could connect to Cloudwatch logs locally and then see the logs by the tail command? Or if I could access Cloudwatch server to see logs? Basically, I wanted to see logs on my terminal. If there is any way to do that, please let me know.
Thanks for your help.
You can use AWS CLI to get your logs in real time. See: get-log-events
AWS doesn't provide a functionality where you can tail the log. There are few 3rd party tools you can use. I have used jorgebastida/awslogs which was sufficient for my needs.
Update 02/25/2021: Thanks to @adavea, I just checked and found AWS has added a new feature to tail the CW logs.
aws.logs.tail
--follow
(boolean) Whether to continuously poll for new logs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With