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

# Apply optimization (dry-run first)
aws-cost-optimizer apply dynamodb my-table --dry-run
aws-cost-optimizer apply dynamodb my-table

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.2.tar.gz (5.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_cost_optimizer-0.1.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aws_cost_optimizer-0.1.2.tar.gz
  • Upload date:
  • Size: 5.5 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.2.tar.gz
Algorithm Hash digest
SHA256 54a33c9661654a83e65945eaf231a180964bce5ef0bee7a04a67ab5babdda921
MD5 c2b04ec7ddf451b189ee81e8c4c963f9
BLAKE2b-256 3f780cc8ca5dcfa61f6a8245daf6b595bec1864c4d7962684dd59844ce08b134

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aws_cost_optimizer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aef0a3baf494dc9f8eac1b9936b86f9aad3fc1551fba7f7d014e23e36173ac86
MD5 31a812256c3f2925b3666409e74f0958
BLAKE2b-256 0c50548ffd5e0cf57892d2ac958f0c57819ca5dd7923ad63da87ed3a313f7357

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