ゆえあってSavings Plans のディスカウントレートを実績と突き合わせるようなことをしていて気がついたんですが、AWS の Cost Explorer でいうところの usage type って us-east-1 (北バージニア)についてはリージョン名含まないことがあるぽいですね。今まであんまり気にしてなかった。古いサービスだとそういうのがあるのかな。
$ AWS_PROFILE=default aws savingsplans describe-savings-plans-offering-rates --service-code AWSLambda --filter name=region,values=us-east-1 --query "searchResults[].{paymentOption: savingsPlanOffering.paymentOption,usageType:usageType,duration:savingsPlanOffering.durationSeconds,rate:rate}" [ { "paymentOption": "Partial Upfront", "usageType": "Lambda-Provisioned-Concurrency", "duration": 94608000, "rate": "0.00000354" }, { "paymentOption": "Partial Upfront", "usageType": "Request", "duration": 94608000, "rate": "0.0000002" }, { "paymentOption": "Partial Upfront", "usageType": "Lambda-GB-Second", "duration": 94608000, "rate": "0.0000142" }, { "paymentOption": "Partial Upfront", "usageType": "Lambda-Provisioned-GB-Second", "duration": 94608000, "rate": "0.00000826" }, { "paymentOption": "All Upfront", "usageType": "Lambda-Provisioned-Concurrency", "duration": 31536000, "rate": "0.00000346" }, { "paymentOption": "All Upfront", "usageType": "Request", "duration": 31536000, "rate": "0.0000002" }, { "paymentOption": "All Upfront", "usageType": "Lambda-GB-Second", "duration": 31536000, "rate": "0.0000138" },
usageType「Request」ってかっこいいなと思った。
なお Fargate とかだと
[ { "paymentOption": "Partial Upfront", "usageType": "USE1-Fargate-vCPU-Hours:perCPU", "duration": 94608000, "rate": "0.02024" }, { "paymentOption": "Partial Upfront", "usageType": "USE1-Fargate-GB-Hours", "duration": 94608000, "rate": "0.0022225" } ...
とリージョン名が入ってる。