Skip to main content

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
    It 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

Metadata

Release files for aws-ec2-pricing-tool 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-ec2-pricing-tool 0.1.6
File Size Uploaded
aws_ec2_pricing_tool-0.1.6.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-ec2-pricing-tool 0.1.6
File Interpreter ABI Platform
aws_ec2_pricing_tool-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 36.7 kB

Release files / aws_ec2_pricing_tool-0.1.6.tar.gz

Download URL aws_ec2_pricing_tool-0.1.6.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0b8371a6ac80a31ad67e22704d589622042dd89ebc6525049cbf7e03e4aa93a1
BLAKE2b-256 checksum
How to use checksums
352633572cbc8b6213f08af1254592d1244fddf9869268d9f764d395bb66b450
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.2

Release files / aws_ec2_pricing_tool-0.1.6-py3-none-any.whl

Download URL aws_ec2_pricing_tool-0.1.6-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7a8545ad7ad0822468303e7ada509ef6ccc5f925011cacfa5ce5ea4680362b7
BLAKE2b-256 checksum
How to use checksums
a8cdffd2b53fd276d7adbee86e17cf95f036b9a745268d2a216250a8de7e1d64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page