diff --git a/backend/app/services/aws/pricing_v2.py b/backend/app/services/aws/pricing_v2.py index 2038d6e..de5a6f8 100644 --- a/backend/app/services/aws/pricing_v2.py +++ b/backend/app/services/aws/pricing_v2.py @@ -96,6 +96,7 @@ async def search_instances_v2( for row in results: hourly_price = float(row['price']) gp3_price = float(row['gp3']) + gp2_price = float(row['gp2']) monthly_price = hourly_price * 730 # 730小时/月 # 计算存储价格 @@ -109,7 +110,7 @@ async def search_instances_v2( break # disk_monthly_price = await calculate_ebs_price(region_code, disk_gb) if region_code else 0 - disk_monthly_price = gp3_price * disk_gb + disk_monthly_price = gp3_price * disk_gb if gp3_price > 0 else gp2_price * disk_gb # 计算总价格 total_monthly_price = monthly_price + disk_monthly_price