diff --git a/ec2.py b/ec2.py index dc58574..91d408b 100644 --- a/ec2.py +++ b/ec2.py @@ -181,6 +181,10 @@ def add_pricing(imap): if region.startswith("cn-"): continue + # Skip capacity block pricing which affects certain p series instances + if product_attributes["marketoption"] == "CapacityBlock": + continue + terms = offer.get("terms") operating_system = product_attributes.get("operatingSystem") diff --git a/in/instance-type.html.mako b/in/instance-type.html.mako index eeae30f..2eeb357 100644 --- a/in/instance-type.html.mako +++ b/in/instance-type.html.mako @@ -99,6 +99,14 @@ + % if i["Amazon"][1]["value"] == 'p5.48xlarge' or i["Amazon"][1]["value"] == 'p4d.24xlarge': +
+
+

This instance is available in Capacity Blocks.

+
+
+ % endif +