Collected knowledge for myself and anyone interested

AWS EC2 Best Price Finder

I am using AWS and the EC2 instances extensively. However I had one issue with finding the best prices for on demand and spot instances. So I developed my own code to check the best prices.

The software will collect the data from AWS and will put it in a sqlite database. It keeps the data for 1 week. Any data older than 1 week will be replaces.

Here is a sample screenshot for graphical user interface

Here is an example of text output:

$ python awsEC2pricing.py -t 8 32
Records are up-to-date
--------------------------
 vCPU: 8.00
 RAM: 32.00
 OS: Linux
 Region: US East (N. Virginia)
--------------------------
Instance        vCPU   RAM    OS         PriceH   PriceM      SpotH    SpotM      KillRate
t3a.2xlarge     8.00   32.00  Linux      0.30080  216.57600   0.10610  76.39200   <5%
m6g.2xlarge     8.00   32.00  Linux      0.30800  221.76000   0.00000  0.00000       
t3.2xlarge      8.00   32.00  Linux      0.33280  239.61600   0.16100  115.92000  <5%
m5a.2xlarge     8.00   32.00  Linux      0.34400  247.68000   0.20950  150.84000  15-20%
t2.2xlarge      8.00   32.00  Linux      0.37120  267.26400   0.11850  85.32000   >20%
m5.2xlarge      8.00   32.00  Linux      0.38400  276.48000   0.19390  139.60800  5-10%

Link for github repo: https://github.com/fuatu/awsEC2pricefinder