RichWatch is wrapper around AWS Cloud Watch to display beautiful logs with help of Python library Rich.

Overview

Python Black GitHub

RichWatch is TUI (Textual User Interface) for AWS Cloud Watch.
It formats and pretty prints Cloud Watch's logs so they are much more readable.
Because it works in terminal, you can have updates from your Lambdas and other AWS services next to your hand, automatically refreshed and represented in beautiful way by excelent Python library Rich and Textual,

Content

What is the difference

So this is example Log output from AWS Cloud Watch:
Test
And here is same output but using RichWatch: Test

⚠️ There is no theme setup yet so Rich format is based of your terminal Theme. Setup for this screenshot is zsh with agnoster in Tilda console.

And both are for same Lambda code:

import json
import logging

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)

def lambda_handler(event, context):
    logger.info("Output from logging.info()")
    logger.debug("Output from logging.debug()")
    logger.error("Output from logging.error()")
    print("Output from print()")
    return {
        'statusCode': 200,
        'body': json.dumps('This is from response!')
    }

Setup and Usage ⚙️

AWS credentials for Boto3

To start you need to setup credentials for AWS. You can do this using AWS Command Line, in ~/.aws/credentials file or via export command of environment variables. You can read more about this here.

Install requirements

You need Python and pip in version 3.6 or higher.
Then you need to install requirements:

pip3 install -r requirements.txt

Setup Log Group file

Then you need to create log_group.txt file like this:

/aws/lambda/lambda-name-1 region-name-1
/aws/lambda/lambda-name-2 
...
/aws/lambda/lambda-name-n region-name-n

Where first word is name o log group, and second optional region(if empty then the default will be taken, if also empty then error will occur). It will display only last part after /.

Run App

Then you can run app:

python3 rich_watch.py

or get logs once and printout to stdout with:

python3 main.py <log_group>

TODO 📝

Set default style
Allow for custom style
Support AWS CLI profiles
Save logs to file
Check for updates and only download the latest
Create RichCloud a PyPi package
Custom log TAGs highlight
Custom refresh time
Collapse all ENDs, STARTs and REPORTs, ect.
Better TreeView
Better StatusView
Dry run (demo without AWS account)

⚠️ The TUI version of RichWatch is base on Textual witch is in progress. If you see any bugs please let me know. Currently TUI is only working for Linux and Macs but on Windows you can run this in script version.

Comments
  • 💡yaml instead of txt, new tree widget, types, refactor, more dry run examples (but simple)

    💡yaml instead of txt, new tree widget, types, refactor, more dry run examples (but simple)

    💡In this pull request: :heavy_check_mark: yaml instead of txt :heavy_check_mark: new tree widget, :heavy_check_mark: refactor, :heavy_check_mark: append missing types, :heavy_check_mark: more dry run examples (but simple)

    opened by Cvaniak 0
  • 💡Save to file, Dry run, Tests

    💡Save to file, Dry run, Tests

    :bulb: Save to file, Dry run, Tests :heavy_check_mark: Save logs to file :heavy_check_mark: Download only new logs :heavy_check_mark: Dry-run! :heavy_check_mark: Readme update :heavy_check_mark: Tests (in raw form)

    opened by Cvaniak 0
  • :fire: README, LICENSE, Fixes, Small improvements, Linters

    :fire: README, LICENSE, Fixes, Small improvements, Linters

    :fire: This commit brings: :heavy_check_mark: LICENSE :heavy_check_mark: README.md update :heavy_check_mark: New Logo with proper name :heavy_check_mark: Linters -> Black, Flake8 :heavy_check_mark: Requirements

    opened by Cvaniak 0
  • 💡Application with basic functionality

    💡Application with basic functionality

    This commit contains:
    ✅ Script that displays and format logs from AWS CloudWatch ✅ TUI App with:

    • Tree View with provided log groups
    • Scroll View that displays formated Logs
    • Simple Status View
    opened by Cvaniak 0
  • Application with basic functionality

    Application with basic functionality

    This commit contains:
    ✅ Working script for one time log download
    ✅ Working TUI App with:

    • Selectable Tree View
    • Scrollable Log View
    • Basic Status View
    • Shortcuts
    opened by Cvaniak 0
Owner
null
Aws-lambda-requests-wrapper - Request/Response wrapper for AWS Lambda with API Gateway

AWS Lambda Requests Wrapper Request/Response wrapper for AWS Lambda with API Gat

null 1 May 20, 2022
A Discord Rich Presence App to set your own custom rich presence.

discord-rich-presence A Discord Rich Presence App to set your own custom rich presence. #BUILDS Ready to use package are available inside "finalpackag

null 1 Nov 22, 2021
Automated AWS account hardening with AWS Control Tower and AWS Step Functions

Automate activities in Control Tower provisioned AWS accounts Table of contents Introduction Architecture Prerequisites Tools and services Usage Clean

AWS Samples 20 Dec 7, 2022
Implement backup and recovery with AWS Backup across your AWS Organizations using a CI/CD pipeline (AWS CodePipeline).

Backup and Recovery with AWS Backup This repository provides you with a management and deployment solution for implementing Backup and Recovery with A

AWS Samples 8 Nov 22, 2022
AWS Blog post code for running feature-extraction on images using AWS Batch and Cloud Development Kit (CDK).

Batch processing with AWS Batch and CDK Welcome This repository demostrates provisioning the necessary infrastructure for running a job on AWS Batch u

AWS Samples 7 Oct 18, 2022
💻 A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline!

LocalStack - A fully functional local AWS cloud stack LocalStack provides an easy-to-use test/mocking framework for developing Cloud applications. Cur

LocalStack 45.3k Jan 2, 2023
A custom Discord Rich Presence to display when you're studying so you're stupid friends won't disturb you when you're studying.

Studying RPC Description A custom Discord Rich Presence to display when you're studying so you're stupid friends won't disturb you when you're studyin

John Edmerson Pizarra 4 Nov 19, 2022
Rich presence app for playstation 3. Display what game you are playing on the PS3 via Discord

PS3-Rich-Presence-for-Discord Discord Rich Presence script for PS3 consoles on HFW&HEN or CFW. Written in Python. Display what you are playing on your

null 17 Dec 11, 2022
This is a script to export logs from AWS CloudTrail to a local file.

cloudtrail-export-logs This is a script to export logs from AWS CloudTrail to a local file. Getting Started Prerequisites python 3 boto3 pip Installin

Claick Assunção de Oliveira 2 Jan 2, 2022
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.

A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and await

Senpai Development 4 Nov 5, 2021
A modern,feature-rich, and async ready API wrapper for Discord written in Python

discord.io A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using asyn

Vincent 18 Jan 2, 2023
Low-level, feature rich and easy to use discord python wrapper

PWRCord Low-level, feature rich and easy to use discord python wrapper Important Note: At this point, this library API is considered unstable and can

MIguel Lopes 1 Dec 26, 2021
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.

disfork A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async a

null 2 Feb 9, 2022
A modern, easy to use, feature-rich, and async ready API wrapper improved and revived from original discord.py.

A Python API wrapper that is improved and revived from the original discord.py

Orion 19 Nov 6, 2021
A Python wrapper around the OpenWeatherMap web API

PyOWM A Python wrapper around OpenWeatherMap web APIs What is it? PyOWM is a client Python wrapper library for OpenWeatherMap (OWM) web APIs. It allow

Claudio Sparpaglione 740 Dec 18, 2022
A Python wrapper around the Soundcloud API

soundcloud-python A friendly wrapper around the Soundcloud API. Installation To install soundcloud-python, simply: pip install soundcloud Or if you'r

SoundCloud 83 Dec 12, 2022
Python API wrapper around Trello's API

A wrapper around the Trello API written in Python. Each Trello object is represented by a corresponding Python object. The attributes of these objects

Richard Kolkovich 904 Jan 2, 2023
A Python wrapper around the Twitter API.

Python Twitter A Python wrapper around the Twitter API. By the Python-Twitter Developers Introduction This library provides a pure Python interface fo

Mike Taylor 3.4k Jan 1, 2023