Skip to main content

AWS Super CLI - See your AWS resources across all accounts in one command

Project description

AWS Super CLI (awsx)

Multi-account AWS resource discovery with advanced cost analysis and service-level credit tracking.

What is awsx?

awsx is a command-line tool for AWS resource discovery and cost analysis across multiple accounts. It solves two key problems:

  1. Multi-account resource visibility - Query resources across all your AWS accounts in parallel
  2. Cost transparency - Separate actual costs from credit-subsidized costs with service-level breakdown

Unlike the AWS CLI which requires manual profile switching and outputs verbose JSON, awsx provides clean tables and can query multiple accounts simultaneously.

Unique feature: Service-level credit usage analysis - see exactly which AWS services consume your promotional credits and at what percentage.

Installation

pip install aws-super-cli

Quick Start

# List EC2 instances across all accounts
awsx ls ec2 --all-accounts

# Cost analysis
awsx cost summary
awsx cost credits-by-service

# See available AWS profiles
awsx accounts

Cost Analysis

awsx provides comprehensive cost analysis using AWS Cost Explorer API:

Basic Cost Commands

awsx cost summary                # Overview with trends and credit breakdown
awsx cost top-spend              # Top spending services (gross costs)
awsx cost with-credits           # Top spending services (net costs after credits)
awsx cost month                  # Current month costs (matches AWS console)
awsx cost daily --days 7         # Daily cost trends
awsx cost by-account             # Multi-account cost breakdown

Credit Analysis

awsx cost credits               # Credit usage trends and burn rate
awsx cost credits-by-service    # Service-level credit breakdown

Key Features

  • Gross vs Net costs: Separate "what you'd pay" from "what you actually pay"
  • Console accuracy: Matches AWS Billing console exactly (fixes API/console discrepancy)
  • Credit transparency: See exactly where promotional credits are applied
  • Service-level breakdown: Which services consume most credits with coverage percentages
  • Trend analysis: Historical patterns and monthly forecasting

Example Output

๐Ÿ’ฐ Cost Summary
Period: Last 30 days
Gross Cost (without credits): $665.75
Net Cost (with credits):      $-0.05
Credits Applied:              $665.79
Daily Average (gross):        $22.19
Trend: โ†— +123.7%
Top Services by Credit Usage
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Service                                โ”ƒ   Gross Cost โ”ƒ Credits Applied โ”ƒ     Net Cost โ”ƒ  Coverage  โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ Amazon Relational Database Service     โ”‚      $366.62 โ”‚         $366.62 โ”‚       <$0.01 โ”‚   100.0%   โ”‚
โ”‚ Amazon Elastic Compute Cloud - Compute โ”‚       $89.65 โ”‚          $89.65 โ”‚        $0.00 โ”‚   100.0%   โ”‚
โ”‚ Amazon Virtual Private Cloud           โ”‚       $83.05 โ”‚          $83.05 โ”‚        $0.00 โ”‚   100.0%   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Supported Services

Service Command Multi-Account Filters
EC2 awsx ls ec2 โœ… --state, --instance-type, --tag
S3 awsx ls s3 --match
VPC awsx ls vpc --match
RDS awsx ls rds --engine
Lambda awsx ls lambda --runtime
ELB awsx ls elb --type
IAM awsx ls iam --iam-type

Multi-Account Support

awsx automatically discovers AWS profiles and queries them in parallel:

# Query all accessible accounts
awsx ls ec2 --all-accounts

# Query specific accounts
awsx ls s3 --accounts "prod-account,staging-account"

# Pattern matching
awsx ls rds --accounts "prod-*"

# List available profiles
awsx accounts

Usage Examples

Resource discovery:

# Find all running production instances
awsx ls ec2 --all-accounts --state running --match prod

# Audit IAM users across production accounts
awsx ls iam --accounts "prod-*" --iam-type users

# Find PostgreSQL databases
awsx ls rds --engine postgres --all-accounts

Cost analysis:

# Monthly financial review
awsx cost summary
awsx cost month
awsx cost credits

# Cost optimization research
awsx cost top-spend --days 7
awsx cost credits-by-service
awsx cost daily --days 30

# Multi-account cost breakdown
awsx cost by-account

Why awsx?

Feature AWS CLI v2 awsx Other Tools
Multi-account queries Manual switching Automatic parallel Varies
Output format JSON only Rich tables Varies
Cost analysis None Advanced Basic
Credit tracking None Service-level None
Setup complexity Medium Zero config High

awsx is the only tool that provides service-level credit usage analysis.

Technical Details

Cost Explorer Integration

awsx fixes a major discrepancy between AWS Cost Explorer API and the AWS Console. The console excludes credits by default, but the API includes them, causing confusion. awsx handles this correctly and provides both views.

Multi-Account Architecture

  • Automatically discovers profiles from ~/.aws/config and ~/.aws/credentials
  • Executes API calls in parallel across accounts and regions
  • Handles AWS SSO, IAM roles, and standard credentials
  • Respects rate limits and implements proper error handling

Performance

  • Parallel API calls across accounts/regions
  • Efficient data aggregation and formatting
  • Minimal API requests (most resource listing is free)
  • Cost Explorer API usage: ~$0.01 per cost analysis command

Configuration

awsx uses your existing AWS configuration. No additional setup required.

Supports:

  • AWS profiles
  • AWS SSO
  • IAM roles
  • Environment variables
  • EC2 instance profiles

Requirements

  • Python 3.8+
  • AWS credentials configured
  • Permissions:
    • Resource listing: ec2:Describe*, s3:List*, rds:Describe*, lambda:List*, elasticloadbalancing:Describe*, iam:List*, sts:GetCallerIdentity
    • Cost analysis: ce:GetCostAndUsage, ce:GetDimensionValues

API Costs

Operation Cost Commands
Resource listing Free All awsx ls commands
Cost Explorer API $0.01/request awsx cost commands

Monthly cost estimate: $0.50-2.00 for typical usage.

Advanced Usage

Debugging:

awsx cost summary --debug
awsx ls ec2 --all-accounts --debug
awsx test

Filtering:

# Fuzzy matching
awsx ls ec2 --match "web"

# Specific filters
awsx ls ec2 --state running --instance-type "t3.*"
awsx ls ec2 --tag "Environment=prod"

# Time-based cost analysis
awsx cost daily --days 14
awsx cost summary --days 90

Contributing

Contributions welcome. Areas of interest:

  • Additional AWS service support
  • Enhanced cost analysis features
  • Multi-account support for more services
  • Performance optimizations

License

Apache 2.0


awsx - Multi-account AWS resource discovery with service-level cost intelligence.

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_super_cli-0.1.1.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

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

aws_super_cli-0.1.1-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file aws_super_cli-0.1.1.tar.gz.

File metadata

  • Download URL: aws_super_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for aws_super_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1ae7d754c0eede9a8b70f9639d41082122bee3f49ef2408e25ddf8b87645d326
MD5 41ea5831d7bcd494c30f4a700e1bd1ea
BLAKE2b-256 93ea80cdbc90b3dd8a17a6ba16c9b73b258e257ce9704bd12823a3a275c3bf13

See more details on using hashes here.

File details

Details for the file aws_super_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aws_super_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for aws_super_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb5715a095fddbc69bbed6c404e801c1b0e3c91b5c63f526e6c1ca13ded0ee88
MD5 8133d9184dbf9ac07cb3623848b5d6e0
BLAKE2b-256 5bc710e9eb73f485e99e818312897367ef770edc2bc200a16d59c0d4992efd06

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