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
- Clone this repo
- Install the required Python packages (Pipenv in repo)
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
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aws_cloud_utilities-2.1.0.tar.gz.
File metadata
- Download URL: aws_cloud_utilities-2.1.0.tar.gz
- Upload date:
- Size: 116.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5384463bc6b0c67abbd13da0db828ead01f787a9d8226d1606a49b0baecdf82b
|
|
| MD5 |
819b39334bbb8a8d0f502e2c7520903f
|
|
| BLAKE2b-256 |
d2394e1464f354c5e6afdc5b61202290796d3aeb9b27bdac851ae6e4979866c5
|
File details
Details for the file aws_cloud_utilities-2.1.0-py3-none-any.whl.
File metadata
- Download URL: aws_cloud_utilities-2.1.0-py3-none-any.whl
- Upload date:
- Size: 130.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da4cf54d4f0fe5bd50b8f745debecb76725855c67c414ce35446569b7ec5637
|
|
| MD5 |
3177f5980e936231dfebbf3ebdc56596
|
|
| BLAKE2b-256 |
84d12c448f3b3caaf21101cc80cdc8a510cd7cff8dba48d682078f07a9d01677
|