Skip to main content

AWS cost optimization recommendations and automation

Project description

AWS Cost Optimizer

CI PyPI

Automated AWS cost optimization recommendations based on production experience achieving 60% cost reduction.

Features

  • DynamoDB Analysis: Identify tables that should use provisioned capacity
  • Lambda Analysis: Find functions without reserved concurrency limits
  • S3 Analysis: Detect buckets missing lifecycle policies
  • CloudFront Analysis: Identify distributions with suboptimal cache settings
  • Rich CLI: Beautiful terminal output with actionable recommendations

Installation

pip install aws-cost-optimizer

Quick Start

# Analyze all services
aws-cost-optimizer analyze

# Analyze specific service
aws-cost-optimizer analyze --service dynamodb

# Bulk apply workflow (safe-first)
aws-cost-optimizer apply --all --service all --dry-run
aws-cost-optimizer apply --all --service dynamodb --dry-run

# Single-resource workflow
aws-cost-optimizer apply --service dynamodb my-table --dry-run

# Interactive menu/hub
aws-cost-optimizer menu

Note: apply currently runs a planned-step execution path (safe scaffolding) and does not yet issue mutating AWS API calls.

Smoke Test

Quick verification that install and CLI wiring are healthy:

python3 -m pip install --upgrade aws-cost-optimizer
aws-cost-optimizer --help
python3 -c "from importlib.metadata import version; print(version('aws-cost-optimizer'))"

Security Checks

  • CI runs Bandit static security analysis on src/aws_cost_optimizer (Python 3.11 job).
  • Failing threshold is set to medium-or-higher severity/confidence.
bandit -r src/aws_cost_optimizer --severity-level medium --confidence-level medium

Example Output

Service: DynamoDB | Resource: my-table | Issue: Using on-demand | Savings: ~40-60% | Action: Switch to provisioned
Service: Lambda | Resource: my-function | Issue: No concurrency limit | Savings: Prevent overruns | Action: Set reserved concurrency
Service: S3 | Resource: my-bucket | Issue: No lifecycle policy | Savings: ~20-30% | Action: Add lifecycle rules

Real-World Results

This tool is based on optimizations that achieved:

  • 60% cost reduction on production serverless application
  • 90% reduction in Lambda invocations via CloudFront caching
  • Predictable costs through provisioned capacity

Requirements

  • Python 3.9+
  • AWS credentials configured
  • IAM permissions for read access to analyzed services

Development

git clone https://github.com/mjfxjas/aws-cost-optimizer
cd aws-cost-optimizer
pip install -e .

License

MIT. See LICENSE.

Changelog

See CHANGELOG.md for versioned release notes.

Author

Jonathan Schimpf - jon@theatrico.org

AWS Solutions Architect Associate with production experience optimizing cloud costs.

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_cost_optimizer-0.1.3.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

aws_cost_optimizer-0.1.3-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file aws_cost_optimizer-0.1.3.tar.gz.

File metadata

  • Download URL: aws_cost_optimizer-0.1.3.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aws_cost_optimizer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c71f741c4ea3cc514fffad0cb46d5fdc9cc9e1e52ebe24705a1731b9e518832a
MD5 f3b26a7c0b50f1bc30eb458c02a138a1
BLAKE2b-256 d4feffd0d4339a5211448d3fe217a9eb472d54be6ab44ae1b6b395399989d8f3

See more details on using hashes here.

File details

Details for the file aws_cost_optimizer-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_cost_optimizer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7d541c36f4753c7455f05491f66095b5e76cfeb75a2216f533f772f34801505f
MD5 f9997201eb061fa5a2482cd79a79bc0a
BLAKE2b-256 5a95b63019974b78be155d7f403b7fa6ef16ef828b3ad31edbbb9d5cb7c1a0cc

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