Skip to main content

A CLI tool for extracting AWS metrics and managing resources

Project description

AWS Vibe Guru ๐Ÿ”ง

A command-line interface (CLI) tool for extracting AWS metrics and managing cloud resources. Initially focused on Amazon SQS queue monitoring.

๐Ÿš€ Features

๐Ÿ“Š SQS Monitoring & Analysis

  • Queue Management: List and filter SQS queues
  • Attribute Analysis: Get comprehensive queue attributes
  • Message Volume Tracking: Monitor message volume with beautiful ASCII charts
  • Age Monitoring: Track oldest message age over time
  • Advanced Analytics: Statistical analysis with mean, median, and percentage comparisons
  • Multi-Queue Support: Analyze multiple queues simultaneously

๐ŸŽจ Visual Enhancements

  • Rich Terminal Output: Beautiful colors, panels, and formatting
  • ASCII Charts: Dynamic bar charts for data visualization
  • Day-of-Week Indicators: [Mon] 2024-01-01: 1,200 messages
  • Formatted Numbers: Thousands separators for readability
  • Color-coded Output: Consistent color scheme throughout

๐Ÿ› ๏ธ Development Features

  • Pre-commit Hooks: Automated code quality checks
  • Comprehensive Testing: Full test suite with AWS mocking
  • Modern Tooling: UV package manager, Ruff linting/formatting
  • Type Safety: Complete type annotations
  • Documentation: Detailed help and usage examples

๐Ÿ“‹ Requirements

  • Python 3.8.1 or higher
  • UV package manager (recommended)
  • AWS credentials configured (either in ~/.aws/credentials or environment variables)

๐Ÿ› ๏ธ Installation

Using UV (Recommended)

# Install UV if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone the repository
git clone https://github.com/daniellbastos/aws-vibe-guru.git
cd aws-vibe-guru

# Install dependencies
uv sync

๐Ÿš€ Usage

๐Ÿ“‹ Available Commands

# List SQS queues
aws-vibe-guru sqs-list-queues
aws-vibe-guru sqs-list-queues --name "prod-"

# Get queue attributes
aws-vibe-guru sqs-get-attributes "my-queue"

# Get message volume metrics (with ASCII chart)
aws-vibe-guru sqs-get-metrics "my-queue"
aws-vibe-guru sqs-get-metrics "my-queue" --days 30

# Get oldest message age
aws-vibe-guru sqs-get-oldest-message "my-queue"
aws-vibe-guru sqs-get-oldest-message "my-queue" --days 14

# Advanced volume analysis
aws-vibe-guru sqs-analyze-volume "my-queue"
aws-vibe-guru sqs-analyze-volume "queue1" "queue2" "queue3"
aws-vibe-guru sqs-analyze-volume "my-queue" --days 60

๐Ÿ“Š Example Output

Queue: my-queue
โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Total messages received: 15,420

Daily breakdown:
[Mon] 2024-01-01: 1,200 messages
[Tue] 2024-01-02: 1,350 messages
[Wed] 2024-01-03: 1,800 messages

Message Volume Chart:
   1,800 โ”ฌ  โ–ˆ
   1,440 โ”ค  โ–ˆ
   1,080 โ”ค  โ–ˆ       โ–ˆ
    720 โ”ค  โ–ˆ       โ–ˆ
    360 โ”ค  โ–ˆ       โ–ˆ
      0 โ”ด  โ–ˆ       โ–ˆ
         01-01   01-02   01-03

Volume Analysis:
โ€ข Peak Volume Day:
  - Date: 2024-01-03
  - Volume: 1,800 messages
โ€ข Comparison with Mean:
  - Mean Volume: 1,450 messages
  - Percentage Above Mean: 24.1%

AWS Credentials

The tool supports two ways to provide AWS credentials:

  1. AWS Credentials File (~/.aws/credentials):

    [default]
    aws_access_key_id = your_access_key
    aws_secret_access_key = your_secret_key
    region = us-east-1
    
  2. Environment Variables:

    export AWS_ACCESS_KEY_ID="your_access_key"
    export AWS_SECRET_ACCESS_KEY="your_secret_key"
    export AWS_DEFAULT_REGION="us-east-1"
    

Project Structure

aws-vibe-guru/
โ”œโ”€โ”€ src/aws_vibe_guru/
โ”‚   โ”œโ”€โ”€ __init__.py          # Version and author information
โ”‚   โ”œโ”€โ”€ cli.py               # Main CLI with all commands
โ”‚   โ”œโ”€โ”€ cli_helpers.py       # Helpers for Rich formatting
โ”‚   โ”œโ”€โ”€ aws_sqs.py           # AWS SQS functions and metrics
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ __init__.py
โ”œโ”€โ”€ Makefile                 # Development commands
โ”œโ”€โ”€ pyproject.toml          # Project configuration
โ””โ”€โ”€ README.md               # This file

๐Ÿ› ๏ธ Development

๐Ÿ› ๏ธ Development

Quick Start

# Clone and setup
git clone https://github.com/daniellbastos/aws-vibe-guru.git
cd aws-vibe-guru
uv sync --extra dev
make pre-commit-install

# Check code quality
make quality

Development Commands

# Install dependencies
uv sync --extra dev

# Check code quality
make quality      # Run linting and formatting
make lint         # Check code with Ruff
make format       # Format code with Ruff

# Install pre-commit hooks
make pre-commit-install

# Run pre-commit manually
make pre-commit-run

Code Quality

This project uses Ruff for linting and formatting, which is fast and modern:

# Check code quality
make lint           # Run linter
make format         # Format code
make quality        # Run both lint and format

# Development helpers
make install-dev    # Install dev dependencies
make clean         # Clean cache files

๐Ÿ“š Documentation

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Technologies Used

  • boto3 - AWS SDK for Python
  • Typer - Framework for building CLIs
  • Rich - Rich text and beautiful formatting in the terminal
  • UV - Fast Python package manager
  • Ruff - Fast Python linter and formatter

๐Ÿ”— Links


Made with โค๏ธ as a vibe coding test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws_vibe_guru-0.0.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_vibe_guru-0.0.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file aws_vibe_guru-0.0.1.tar.gz.

File metadata

  • Download URL: aws_vibe_guru-0.0.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.2

File hashes

Hashes for aws_vibe_guru-0.0.1.tar.gz
Algorithm Hash digest
SHA256 195dcfa9b3a3eba0706937b37ec6f073f5075cde13fd055059dfcf2fe0a503fc
MD5 0a453c78aa49e56b64b4e0aca9d966e9
BLAKE2b-256 9db7cda78230cff4e7e51f13e2ff1a1359f332ceef7ee570a67849575d665290

See more details on using hashes here.

File details

Details for the file aws_vibe_guru-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: aws_vibe_guru-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.2

File hashes

Hashes for aws_vibe_guru-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11c16a50bb25e8105656ede3475dcf7a72615049cdfa6de2aaa3ffadebf63946
MD5 d5c07c88ae4efc966d2796a9a9a78621
BLAKE2b-256 91689ecc901e9a750812bdbcebd31f6013dbd58747ff2fdaf8909a16014ce4ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page