This project automatically fetches and updates pricing information for Amazon EC2 instances and Amazon Lightsail bundles across all regions. It uses GitHub Actions to run daily updates and store the results in this repository.
- Daily updates of EC2 on-demand instance prices for all regions
- Daily updates of Lightsail bundle prices (same across all regions)
- Supports both Linux and Windows EC2 instances
- Caching mechanism to reduce unnecessary API calls
- Manual trigger option with force update capability
The project uses a GitHub Actions workflow to:
- Fetch EC2 pricing data for all regions and both Linux and Windows operating systems
- Fetch Lightsail bundle pricing data
- Store the data in structured directories within the repository
- Commit and push the changes daily
The workflow utilizes functions from the easy-aws-helper project to interact with AWS services and retrieve pricing information.
ec2/on-demand/<os>/<region>/prices.txt
: EC2 instance prices for each OS and regionec2/on-demand/<os>/<region>/cache.txt
: Cache file for EC2 priceslightsail/prices.txt
: Lightsail bundle priceslightsail/cache.txt
: Cache file for Lightsail prices
Here's an example of the EC2 pricing output for Linux instances in the ap-southeast-1 region (ec2/on-demand/linux/ap-southeast-1/prices.txt
):
+---------------------+------+------------+----------+-----------+--------------+---------------+--------------+
| Instance type | vCPU | CPU type | RAM (GB) | Disk (GB) | Price ($/hr) | Price ($/day) | Price ($/mo) |
+---------------------+------+------------+----------+-----------+--------------+---------------+--------------+
| t2.nano | 1 | i386 | 0.5 | None | 0.0073 | 0.18 | 5.33 |
| t3.nano | 2 | x86_64 | 0.5 | None | 0.0066 | 0.16 | 4.82 |
| t3a.nano | 2 | x86_64 | 0.5 | None | 0.0059 | 0.14 | 4.31 |
| t4g.nano | 2 | arm64 | 0.5 | None | 0.0053 | 0.13 | 3.87 |
| t1.micro | 1 | i386 | 0.6 | None | 0.02 | 0.48 | 14.61 |
| t2.micro | 1 | i386 | 1.0 | None | 0.0146 | 0.35 | 10.67 |
| t3.micro | 2 | x86_64 | 1.0 | None | 0.0132 | 0.32 | 9.64 |
| t3a.micro | 2 | x86_64 | 1.0 | None | 0.0118 | 0.28 | 8.62 |
| t4g.micro | 2 | arm64 | 1.0 | None | 0.0106 | 0.25 | 7.74 |
...
The price updates are automated, but you can also manually trigger the workflow:
- Go to the "Actions" tab in the GitHub repository
- Select the "Update EC2 and Lightsail Instance Prices" workflow
- Click "Run workflow"
- Choose whether to force update EC2 and/or Lightsail prices ignoring the cache
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open-source and available under the MIT License.
This project makes use of the easy-aws-helper to generate the prices data.