A tool for viewing AWS CloudWatch logs nicely in the terminal.
You can install it from PyPI:
python -m pip install zmunk-awslogs
The tool is supported on Python 3.10 and above.
$ export AWS_DEFAULT_PROFILE=<your-profile>
$ python
>>> from awslogs import trail_logs
>>> trail_logs("/aws/lambda/your-function", "5m")
You could also use it from the command line.
$ python -m awslogs /aws/lambda/your-function 5m