terms = json.loads(response['PriceList'][0])['terms']
print(f"Terms: {terms}")
I can’t seem to extract the pricePerUnit
because of the dynamic key HY3BZPP2B6K8MSJF.JRTCKXETXF
Terms: {'OnDemand': {'HY3BZPP2B6K8MSJF.JRTCKXETXF': {'priceDimensions': {'HY3BZPP2B6K8MSJF.JRTCKXETXF.6YS6EN2CT7': {'unit': 'GB-Mo', 'endRange': 'Inf', 'description': '$0.10 per GB-month of General Purpose SSD (gp2) provisioned storage - US East (Northern Virginia)', 'appliesTo': [], 'rateCode': 'HY3BZPP2B6K8MSJF.JRTCKXETXF.6YS6EN2CT7', 'beginRange': '0', 'pricePerUnit': {'USD': '0.1000000000'}}}, 'sku': 'HY3BZPP2B6K8MSJF', 'effectiveDate': '2023-04-01T00:00:00Z', 'offerTermCode': 'JRTCKXETXF', 'termAttributes': {}}}}