0

Currently the ec2 instance savings plan rate can be retrieved through boto3's pricing client get_products(). However it does not seem to offer the compute savings plan rates.

Where in the API can I retrieve the compute savings plan rates?

Edit: The describe_savings_plan_rates is not suitable as I want a non truncated value

Lamanus
  • 12,898
  • 4
  • 21
  • 47
dng
  • 1,275
  • 1
  • 8
  • 10

1 Answers1

2

There is indeed an API for savings plans, the functions are documented here.

And available in the Boto3 SDK here.

For the rates themselves you can use the describe_savings_plan_rates function.

Chris Williams
  • 32,215
  • 4
  • 30
  • 68
  • I see, however the `describe_savings_plan_rates` truncate the hourly commitment. This is why I used `pricing.get_products()` as it gives the flat usage which I can divide by the number of hours to get a more accurate hourly commitment. Is there an equivalent for the compute savings plans? – dng Jun 11 '20 at 09:40
  • 1
    Unfortunately that is all that is provided via the APIs as far as I can tell – Chris Williams Jun 11 '20 at 09:51