Skip to main content

CLI tool to compare AWS EC2 on-demand 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.

PyPI version Python version License GitHub stars

💡 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.

AWS-EC2 Instance Pricing Tool

Requirements

  • Python 3.7+
    The package 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 need to set a default region in your environment.

Installation

Install from PyPI:

pip install aws-ec2-pricing-tool

Or clone from GitHub and install manually:

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

Usage

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

ec2pricing <instance_type> --os <linux|windows> [--distro <distro_name>]

Examples

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

ec2pricing t2.micro --os linux --distro ubuntu

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

ec2pricing t3.medium --os windows --distro microsoft

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

ec2pricing t2.micro --os linux

Linux Instances Demo

EC2 Pricing Linux

Windows Instances Demo

EC2 Pricing Windows

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.4.tar.gz (17.7 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.4-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aws_ec2_pricing_tool-0.1.4.tar.gz
  • Upload date:
  • Size: 17.7 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.4.tar.gz
Algorithm Hash digest
SHA256 2ba0926b2001396d6ba72e64a1ae09f7fddb76234df36a427f45459cb9d60c2c
MD5 2d8a9e58eb68b5ccd17c996c49c080f8
BLAKE2b-256 cc67246bb728b6ac24df254c1affc9003cb8b4f01a78dc6316eeafe97156d1fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aws_ec2_pricing_tool-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d4bfe7162b429961ac28ff8adced96ba5c7ed08a7ac061b79b50ecc68940ba9c
MD5 046ec400ecc6324770ee2651f3526515
BLAKE2b-256 9060574e6eb972421da395f49c68d21cafe9517e5975d7af4c927643781cfec1

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