Skip to main content

CLI tool to compare AWS EC2 pricing and AMIs across regions

Project description

AWS EC2 Instance Pricing Tool

A Python CLI tool to fetch and compare AWS EC2 hourly on-demand pricing and the latest AMI IDs across all available AWS regions.
Supports Linux distributions (Ubuntu, Amazon Linux, RHEL, SUSE) and Windows instances.

💡 Ideal for DevOps engineers, cloud architects, and infrastructure teams looking to optimize EC2 costs or automate cloud image selection.

🔖 This tool focuses on on-demand EC2 pricing, making it perfect for dynamic or short-term workloads where flexibility matters.

Requirements

  • Python 3.7+
    The script is compatible with Python 3.7 and above.

  • AWS Credentials Configured
    The tool uses boto3 to interact with AWS APIs. Make sure your AWS CLI or environment variables are configured with appropriate credentials and permissions to access EC2 and Pricing APIs.

    • Note: you don't have to have a default region set in your environment
  • Python Dependencies
    Install required Python packages using pip:

    pip install boto3 rich
    

    Or

    pip install -r requirements.txt
    

Installation

git clone https://github.com/spithash/AWS-EC2-Instance-Pricing-Tool.git
cd AWS-EC2-Instance-Pricing-Tool
pip install -r requirements.txt

Usage

Run the tool from the command line by specifying the EC2 instance type, operating system, and optionally the distro:

python ec2-price-checker.py <instance_type> --os <linux|windows> [--distro <distro_name>]

Examples

Fetch pricing and AMI info for a Linux Ubuntu t2.micro instance:

python3 ec2-price-checker.py t2.micro --os linux --distro ubuntu

Fetch pricing and AMI info for a Windows t3.medium instance (Microsoft publisher):

python3 ec2-price-checker.py t3.medium --os windows --distro microsoft

Fetch pricing and AMI info for a Linux instance across all distros (no distro specified):

python3 ec2-price-checker.py t2.micro --os linux

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_ec2_pricing_tool-0.1.0.tar.gz (17.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_ec2_pricing_tool-0.1.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file aws_ec2_pricing_tool-0.1.0.tar.gz.

File metadata

  • Download URL: aws_ec2_pricing_tool-0.1.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for aws_ec2_pricing_tool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1f221378ebd8af5a21a512c2a8a7d5da8ec3c76b7813901d503fa213d31b108e
MD5 7f6e9845407ce374e79ec458003a74bc
BLAKE2b-256 4e76ea5f5e5f22625a4d4fe5a8e35193530b869a782f4817c95fb088418f245a

See more details on using hashes here.

File details

Details for the file aws_ec2_pricing_tool-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_ec2_pricing_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5cdee4446e06773f82a2869aa0de04d2b89b2c61bb1b372feba985693bcfccf
MD5 2f0b959127f5a450d776f45c0bad2614
BLAKE2b-256 42d2e7d760a13036509af7c78ba2bf04897d334e4f13497d125d2679e639f013

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