https://github.com/spithash/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 (Ubuntu, Amazon Linux, RHEL, SUSE) and Windows instances.
https://github.com/spithash/aws-ec2-instance-pricing-tool
aws aws-pricing cli-tool cloud devops devops-tools ec2 python
Last synced: 4 months ago
JSON representation
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 (Ubuntu, Amazon Linux, RHEL, SUSE) and Windows instances.
- Host: GitHub
- URL: https://github.com/spithash/aws-ec2-instance-pricing-tool
- Owner: spithash
- License: gpl-3.0
- Created: 2025-07-10T17:19:29.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-07-10T18:55:56.000Z (10 months ago)
- Last Synced: 2025-07-10T23:18:30.076Z (10 months ago)
- Topics: aws, aws-pricing, cli-tool, cloud, devops, devops-tools, ec2, python
- Language: Python
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
[](https://pypi.org/project/aws-ec2-pricing-tool/)
[](https://pypi.org/project/aws-ec2-pricing-tool/)
[](https://github.com/spithash/AWS-EC2-Instance-Pricing-Tool/blob/main/LICENSE)
[](https://github.com/spithash/AWS-EC2-Instance-Pricing-Tool/stargazers)
💡 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 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:
```bash
pip install aws-ec2-pricing-tool
```
Or clone from GitHub and install manually:
```bash
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:
```bash
ec2pricing --os [--distro ]
```
### Examples
Fetch pricing and AMI info for a Linux Ubuntu t2.micro instance:
```bash
ec2pricing t2.micro --os linux --distro ubuntu
```
Fetch pricing and AMI info for a Windows t3.medium instance (Microsoft publisher):
```bash
ec2pricing t3.medium --os windows --distro microsoft
```
Fetch pricing and AMI info for a Linux instance across all distros (no distro specified):
```bash
ec2pricing t2.micro --os linux
```
## Linux Instances Demo

## Windows Instances Demo
