Skip to main content

A unified command-line toolkit for AWS operations with enhanced functionality

Project description

AWS Cloud Utilities v2

A unified command-line toolkit for AWS operations with enhanced functionality. This package consolidates various AWS management scripts into a single, powerful CLI tool.

Prerequisites

  • Python 3.x
  • Boto3 library
  • AWS credentials configured (e.g., via ~/.aws/credentials or environment variables)

Installation

  1. Clone this repo
  2. Install the required Python packages (Pipenv in repo)
    1. pipenv sync

Features

  • Unified CLI: Single command interface for all AWS operations
  • Parallel Processing: Multi-threaded operations for improved performance
  • Rich Output: Beautiful, formatted output with tables and colors
  • Flexible Configuration: Support for AWS profiles, regions, and custom settings
  • Comprehensive Coverage: Tools for cost optimization, inventory, security, logs, and more

Installation

# Install from PyPI (when published)
pip install aws-cloud-utilities

# Install from source
git clone https://github.com/jon-the-dev/aws-cloud-tools.git
cd aws-cloud-tools/v2
pip install -e .

Quick Start

# Get account information
aws-cloud-utilities account info

# List all resources in your account
aws-cloud-utilities inventory resources

# Find cheapest GPU spot instances
aws-cloud-utilities costops gpu-spots --instance-type p3.2xlarge

# Troubleshoot MySQL RDS connection issues
aws-cloud-utilities rds troubleshoot-mysql my-mysql-db

# Aggregate CloudWatch logs
aws-cloud-utilities logs aggregate --log-group /aws/lambda/my-function

# Security audit
aws-cloud-utilities security blue-team-audit

Command Structure

The CLI follows a hierarchical structure similar to the AWS CLI:

aws-cloud-utilities [GLOBAL-OPTIONS] <service> <operation> [OPTIONS]

Available Services

  • account: Account information and management
  • costops: Cost optimization and pricing tools
  • inventory: Resource discovery and inventory
  • logs: CloudWatch logs management
  • rds: RDS management and troubleshooting
  • security: Security auditing and tools
  • s3: S3 bucket operations
  • iam: IAM management and auditing
  • networking: Network utilities
  • support: AWS support tools

Global Options

  • --profile: AWS profile to use
  • --region: AWS region
  • --output: Output format (json, yaml, table)
  • --verbose: Enable verbose logging
  • --debug: Enable debug mode

Configuration

Create a .env file in your project directory or home directory:

AWS_PROFILE=default
AWS_DEFAULT_REGION=us-east-1
AWS_OUTPUT_FORMAT=table
WORKERS=4

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/jon-the-dev/aws-cloud-tools.git
cd aws-cloud-tools/v2

# Install in development mode
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=aws_cloud_utilities

# Run specific test file
pytest tests/test_cli.py

Code Quality

# Format code
black aws_cloud_utilities tests

# Lint code
flake8 aws_cloud_utilities tests

# Type checking
mypy aws_cloud_utilities

Migration from v1

If you're migrating from the original script collection, see our Migration Guide for detailed instructions.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

Changelog

See CHANGELOG.md for version history and changes.

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_cloud_utilities-2.1.1.tar.gz (116.6 kB view details)

Uploaded Source

Built Distribution

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

aws_cloud_utilities-2.1.1-py3-none-any.whl (130.1 kB view details)

Uploaded Python 3

File details

Details for the file aws_cloud_utilities-2.1.1.tar.gz.

File metadata

  • Download URL: aws_cloud_utilities-2.1.1.tar.gz
  • Upload date:
  • Size: 116.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for aws_cloud_utilities-2.1.1.tar.gz
Algorithm Hash digest
SHA256 e6f1d12939ecc73a7b35e70b39175289bdf001837137291b2f2c65d68d1d8715
MD5 b4c2dd0be97f7e0a0f9e946d499bd2b0
BLAKE2b-256 bf03d49e87fdc6fb66930c929ea5464d03592d9373fcd602cbe28affdd92701c

See more details on using hashes here.

File details

Details for the file aws_cloud_utilities-2.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_cloud_utilities-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2501d46e1f367a2878b15c3efb9cee5bec743e345d389674f4b1c3cda3ae702b
MD5 ab6231a91674ca7545d9a0e8201ebce8
BLAKE2b-256 2482485e1287c9a29e8709fe9d9134809ff0eb815cd9d8386fa6a47e5fc18777

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