π Identify AWS cost waste and security vulnerabilities across 16 core services with a single command
Save thousands of dollars monthly and improve security posture by finding unused resources, oversized instances, misconfigurations, and compliance issues
π― Quick Start β’ π Documentation β’ π§ Installation β’ π‘ Examples
Not just CLI! Kosty includes a beautiful, modern web dashboard to visualize your optimization results:
β¨ Premium Features: Interactive charts, responsive design, real-time data visualization, and professional reporting.
After years of AWS consulting , I kept finding the same costly patterns:
- Load Balancers with no targets 10K$-30K$/year wasted
- Orphaned EBS volumes: $1,000-2,500/year
- Unused NAT Gateways, oversized instances, old snapshots,...
Every. Single. Time.
So I built Kosty - the tool I wish existed when I started consulting.
- π Scans 16 core AWS services in one command
- π° Identifies orphaned resources (instant cost savings)
- π Finds oversized instances (EC2, RDS, Lambda)
- π Detects security vulnerabilities (public DBs, unencrypted storage, open ports)
- π‘οΈ Identifies compliance issues (old access keys, public snapshots, weak configurations)
One command. Full audit. Free forever.
AWS costs and security risks can spiral out of control quickly. Kosty helps you:
- π Discover unused resources and security vulnerabilities across 16 core AWS services
- π° Identify oversized and idle resources for cost optimization
- π Detect security misconfigurations and compliance issues
- β‘ Optimize with prioritized recommendations for cost and security
- π’ Scale across entire AWS Organizations with parallel processing
- π Track issues with comprehensive reporting
# Install Kosty via pip (recommended)
pip install kosty
# Or install from source
git clone https://github.com/kosty-cloud/kosty.git
cd kosty && ./install.sh
# π ONE COMMAND TO RULE THEM ALL - Comprehensive scan
kosty audit --output all
# Organization-wide comprehensive scan with reports
kosty audit --organization --max-workers 20 --output all
# Individual service scans
kosty ec2 audit --cpu-threshold 20
kosty rds audit
kosty s3 audit
# Cost and security audits separately
kosty ec2 cost-audit --cpu-threshold 20
kosty s3 security-audit
kosty iam security-audit
# Individual checks
kosty ec2 check-oversized-instances --cpu-threshold 20
kosty ec2 check-stopped-instances --days 7
kosty s3 check-empty-buckets
kosty rds check-public-databases
# π View results in beautiful dashboard
open dashboard/index.html- Python 3.7+
- AWS CLI configured with appropriate credentials
pip install kostygit clone https://github.com/kosty-cloud/kosty.git
cd kosty
./install.shgit clone https://github.com/kosty-cloud/kosty.git
cd kosty
pip install -e .# Find oversized EC2 instances
kosty ec2 check-oversized-instances --cpu-threshold 20
# Find unused RDS read replicas
kosty rds check-unused-read-replicas
# Find over-provisioned Lambda functions
kosty lambda check-over-provisioned-memory
# Find orphaned EBS volumes
kosty ebs check-orphan-volumes
# Find unattached Elastic IPs
kosty eip check-unattached-eips# Storage optimization & security
kosty s3 check-empty-buckets
kosty s3 check-public-read-access
kosty s3 check-encryption-at-rest
kosty ebs check-orphan-volumes
kosty ebs check-unencrypted-orphan
kosty snapshots check-old-snapshots --days 30
kosty snapshots check-public-snapshots
# Database optimization & security
kosty rds check-oversized-instances --cpu-threshold 20
kosty rds check-public-databases
kosty rds check-unencrypted-storage
kosty dynamodb check-idle-tables
# Network optimization & security
kosty lb check-no-healthy-targets
kosty nat check-unused-gateways
kosty sg check-unused-groups
kosty sg check-overly-permissive
# Security & compliance checks
kosty ec2 check-ssh-open
kosty ec2 check-imdsv1
kosty ec2 check-unencrypted-ebs
kosty iam check-root-access-keys
kosty iam check-unused-roles
kosty iam check-old-access-keys# π― ULTIMATE COST AUDIT - All services, all checks
kosty audit --output all
# Organization-wide comprehensive scan (16 services)
kosty audit --organization --max-workers 20 --output json
# Multi-region comprehensive audit
kosty audit --regions us-east-1,eu-west-1,ap-southeast-1 --output csv
# Single region scan
kosty audit --region eu-west-1 --output json
# Quick console summary
kosty audit --output console
# Generate all report formats
kosty audit --organization --output all --max-workers 15
# π Visualize results in dashboard
kosty audit --output json
open dashboard/index.html # Upload the JSON fileKosty offers 3 types of commands for maximum flexibility:
kosty <service> audit # Complete audit (cost + security)
kosty ec2 audit # All EC2 checks
kosty s3 audit # All S3 checkskosty <service> cost-audit # Cost optimization only
kosty <service> security-audit # Security issues only
kosty ec2 cost-audit # EC2 cost issues only
kosty s3 security-audit # S3 security issues only
kosty iam security-audit # IAM security issues onlykosty <service> check-<issue> # Specific check
kosty ec2 check-oversized-instances
kosty ec2 check-stopped-instances
kosty s3 check-empty-buckets
kosty rds check-public-databases
kosty iam check-root-access-keys# Multi-region scanning
kosty audit --regions us-east-1,eu-west-1,ap-southeast-1
kosty ec2 audit --regions us-east-1,eu-west-1
# Organization-wide with multi-region
kosty audit --organization --regions us-east-1,eu-west-1 --max-workers 20
kosty s3 check-public-read-access --organization --regions us-east-1,eu-west-1
# Custom cross-account role for organization scanning
kosty audit --organization --cross-account-role MyCustomRole
# Separate organizational admin account
kosty audit --organization --org-admin-account-id 123456789012
# Combined custom role and admin account
kosty audit --organization --cross-account-role MyRole --org-admin-account-id 123456789012| Category | Services | Key Checks |
|---|---|---|
| π» Compute | EC2, Lambda | Oversized instances, unused functions |
| ποΈ Storage | S3, EBS, Snapshots | Empty buckets, orphaned volumes, old snapshots |
| ποΈ Database | RDS, DynamoDB | Idle databases, over-provisioned tables |
| π Network | EIP, LB, NAT, SG, Route53 | Unused resources, no healthy targets |
| π Security | IAM | Unused roles, old access keys, inactive users |
| π Management | CloudWatch, Backup | Unused alarms, expensive logs, empty vaults |
| π Application | API Gateway | Unused APIs, expensive configurations |
| Service | Total Commands | Audit Types | Individual Checks |
|---|---|---|---|
| EC2 | 16 | 3 | 13 checks |
| RDS | 17 | 3 | 14 checks |
| S3 | 14 | 3 | 11 checks |
| IAM | 13 | 3 | 10 checks |
| EBS | 12 | 3 | 9 checks |
| LB | 10 | 3 | 7 checks |
| SG | 9 | 3 | 6 checks |
| Lambda | 8 | 3 | 5 checks |
| EIP | 7 | 3 | 4 checks |
| CloudWatch | 7 | 3 | 4 checks |
| Backup | 6 | 3 | 3 checks |
| NAT | 6 | 3 | 3 checks |
| Snapshots | 6 | 3 | 3 checks |
| API Gateway | 5 | 3 | 2 checks |
| DynamoDB | 5 | 3 | 2 checks |
| Route53 | 5 | 3 | 2 checks |
π Total: 147 commands (1 global + 146 service commands)
EC2 (13 individual checks):
check-oversized-instances- Instances with low CPU utilizationcheck-stopped-instances- Instances stopped for 7+ dayscheck-ssh-open- SSH port open to 0.0.0.0/0check-idle-instances- Instances with <5% CPU usage
S3 (11 individual checks):
check-empty-buckets- Buckets with no objectscheck-public-read-access- Buckets with public read accesscheck-encryption-at-rest- Unencrypted bucketscheck-lifecycle-policy- Buckets needing lifecycle policies
RDS (14 individual checks):
check-public-databases- Publicly accessible databasescheck-oversized-instances- Over-provisioned RDS instancescheck-unused-read-replicas- Unused read replicascheck-unencrypted-storage- Unencrypted RDS storage
IAM (10 individual checks):
check-root-access-keys- Root account access keyscheck-unused-roles- Roles unused for 90+ dayscheck-inactive-users- Inactive users with active keyscheck-wildcard-policies- Policies with wildcard permissions
# π ONE COMMAND TO AUDIT EVERYTHING
kosty audit
# Organization-wide comprehensive audit
kosty audit --organization --max-workers 20
# Generate all report formats
kosty audit --output allWhat kosty audit does:
- β Scans 16 core AWS services automatically
- β Runs complete audits (cost + security) per service
- β Generates comprehensive reports (JSON, CSV, Console)
- β Prioritizes issues by severity and impact
- β Scales across single account or entire organization
- β Modular CLI Architecture - Organized by AWS service for maintainability
- β Command Line Interface - Powerful CLI for automation and scripting
- β Visual Web Dashboard - Modern React-based interface with interactive charts
- β Multiple Report Formats - Console, JSON, CSV outputs + visual reports
- β 16 Core AWS Services - Essential infrastructure coverage
- β
One-Command Audit -
kosty auditscans everything - β Organization Support - Multi-account scanning with configurable roles
- β
Multi-Region - Scan across multiple AWS regions simultaneously with
--regions - β Flexible IAM - Custom cross-account roles and separate org admin accounts
- β Parallel Processing - High-performance with configurable workers
- β Issue Tracking - Comprehensive categorization and prioritization
- β Safe Operations - Read-only analysis, no resource modifications
- β Professional Reporting - Executive-ready dashboards and reports
- β Smart Validation - Upfront permission checks with clear error messages
- π Complete Documentation
- π§ AWS Credentials Setup
- π’ Organization Mode Setup
- π Cross-Account Role Configuration
- π Visual Dashboard
- ποΈ CLI Architecture
- π Release Notes
- π οΈ Troubleshooting Guide
We welcome contributions! Here's how you can help:
- π Report Issues - Found a bug? Open an issue
- π‘ Feature Requests - Have an idea? Start a discussion
- π§ Add Services - Implement new AWS service checks
- π Improve Docs - Help make documentation better
- β Star the Repo - Show your support!
# kosty/services/new_service_audit.py
import boto3
from typing import List, Dict, Any
class NewServiceAuditService:
def __init__(self):
self.cost_checks = ['check_unused_resources']
self.security_checks = ['check_public_access']
def audit(self, session: boto3.Session, region: str, **kwargs) -> List[Dict[str, Any]]:
results = []
results.extend(self.cost_audit(session, region, **kwargs))
results.extend(self.security_audit(session, region, **kwargs))
return resultsThis project is licensed under the MIT License - see the LICENSE file for details.
If Kosty helped you save money on AWS costs, please:
- β Star this repository
- π¦ Share on Twitter with #AWSCostOptimization
- π¬ Tell your colleagues about cost optimization
- π€ Contribute to make it even better
π° Save money. Optimize AWS. Scale efficiently.
