I have created a script to get best prices for on-demand and also see spot prices for the same instances. https://github.com/fuatu/awsEC2pricefinder
This is what I give as an output below. I want to have another column for each instance and display the "Frequency of interruption".
(awspricing) ~/Projects/awspricing $ python awsEC2pricing.py -t 2 4Records are up-to-date-------------------------- vCPU: 2.00 RAM: 4.00 OS: Linux Region: US East (N. Virginia)--------------------------Instance vCPU RAM OS PriceH PriceM SpotH SpotM t3a.medium 2.00 4.00 Linux 0.03760 27.07200 0.01140 8.20800t3.medium 2.00 4.00 Linux 0.04160 29.95200 0.01250 9.00000t2.medium 2.00 4.00 Linux 0.04640 33.40800 0.01430 10.29600a1.large 2.00 4.00 Linux 0.05100 36.72000 0.01990 14.32800t3a.large 2.00 8.00 Linux 0.07520 54.14400 0.02260 16.27200m6g.large 2.00 8.00 Linux 0.07700 55.44000 0.00000 0.00000
You can see "Frequency of interruption" percentages here: https://aws.amazon.com/ec2/spot/instance-advisor/
I googled and also checked the boto3 ec2 methods and cannot find any option to get interruption rates. So any help to show how to get this data programmatically are welcome.