AWS

現在のインスタンス料金を取得する script: Elasticache 編

More than 1 year has passed since last update.

http://qiita.com/bells17/items/5326d11edc6acc4feea2
の Elasticache 編です

script は以下のような感じ

elasticache.rb
require 'json'
require 'bigdecimal'

results = {}
json_data = open(ARGV[0]) {|io| JSON.load(io) }

# product 情報を取得
json_data['products'].keys.each do |skuNo|
    product = json_data['products'][skuNo]

    if (product['productFamily'] == 'Cache Instance' and
          product['attributes']['locationType'] == 'AWS Region' and
          product['attributes']['location'] == 'Asia Pacific (Tokyo)')

        results[product['sku']] = {
            sku: product['sku'],
            location: product['attributes']['location'],
            instanceType: product['attributes']['instanceType'],
            instanceFamily: product['attributes']['instanceFamily'],
            cacheEngine: product['attributes']['cacheEngine'],
            vcpu: product['attributes']['vcpu'],
            memory: product['attributes']['memory'],
            networkPerformance: product['attributes']['networkPerformance'],
            currentGeneration: product['attributes']['currentGeneration'],
            price_unit: 'USD'
        }

    end
end


# price

## on demand
json_data['terms']['OnDemand'].keys.each do |skuNo|
    if (results[skuNo])
        results[skuNo][:price_per_hour] = Proc.new {
            skuTerm = json_data['terms']['OnDemand'][skuNo][json_data['terms']['OnDemand'][skuNo].keys[0]]
            priceInfo = skuTerm['priceDimensions'][skuTerm['priceDimensions'].keys[0]]
            sprintf('%.3f', BigDecimal(priceInfo['pricePerUnit']['USD']).floor(2).to_f.to_s)
        }.call
        results[skuNo][:price_per_day] = sprintf('%.3f', (BigDecimal(results[skuNo][:price_per_hour]) * BigDecimal("24")).floor(2).to_f.to_s)
        results[skuNo][:price_per_month] = sprintf('%.3f', (BigDecimal(results[skuNo][:price_per_day]) * BigDecimal("30")).floor(2).to_f.to_s)
    end
end

## reserved 
json_data['terms']['Reserved'].keys.each do |skuNo|
    if (results[skuNo])
        plans = json_data['terms']['Reserved'][skuNo].values

        results[skuNo][:price_reserved_1year_purchased_all_upfront] = sprintf('%.3f', plans.find { |plan|
            plan['termAttributes']['LeaseContractLength'] == '1yr'
        }['priceDimensions'].values.find {|priceDimension|
            priceDimension['description'] == "Upfront Fee"
        }['pricePerUnit']['USD'])

        results[skuNo][:price_reserved_3year_purchased_all_upfront] = sprintf('%.3f', plans.find { |plan|
            plan['termAttributes']['LeaseContractLength'] == '3yr'
        }['priceDimensions'].values.find {|priceDimension|
            priceDimension['description'] == "Upfront Fee"
        }['pricePerUnit']['USD'])

    end
end


# sort
# cacheEngine -> 現行世代? -> インスタンスファミリー 毎に並べる
sorted_result = {}
results.values.each do |row|
    sorted_result[row[:cacheEngine]] ||= {}
    sorted_result[row[:cacheEngine]][row[:currentGeneration]] ||= {}
    sorted_result[row[:cacheEngine]][row[:currentGeneration]][row[:instanceFamily]] ||= []
    sorted_result[row[:cacheEngine]][row[:currentGeneration]][row[:instanceFamily]].push row
end

results = []
['Redis', 'Memcached'].each do |engine|
    ['Yes', 'No'].each do |currentGeneration|   
        next unless sorted_result[engine][currentGeneration]
        sorted_result[engine][currentGeneration].keys.sort.each do |instanceFamily|
            results.concat sorted_result[engine][currentGeneration][instanceFamily].sort_by { |row| row[:price_per_hour] }
        end
    end
end

p results.to_json

上記を保存して以下のように実行する

$ curl https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonElastiCache/current/index.json > price-AmazonElastiCache.json
$ ruby scripts/elasticache.rb price-AmazonElastiCache.json | sed -e s/^\"// | sed -e s/\"$// | sed -e 's/\\"/"/g' | jq .

以下のような結果が取れる

[
  {
    "sku": "7FVHFW6UA65FQ5TJ",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.r3.large",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Redis",
    "vcpu": "2",
    "memory": "13.5 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.270",
    "price_per_day": "6.480",
    "price_per_month": "194.400",
    "price_reserved_1year_purchased_all_upfront": "777.000",
    "price_reserved_3year_purchased_all_upfront": "1482.000"
  },
  {
    "sku": "XSA3BBK2RYY3SEAC",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.r3.xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Redis",
    "vcpu": "4",
    "memory": "28.4 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.540",
    "price_per_day": "12.960",
    "price_per_month": "388.800",
    "price_reserved_1year_purchased_all_upfront": "1554.000",
    "price_reserved_3year_purchased_all_upfront": "2964.000"
  },
  {
    "sku": "XRVAZFEM7E9YTD7J",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.r3.2xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Redis",
    "vcpu": "8",
    "memory": "58.2 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "1.090",
    "price_per_day": "26.160",
    "price_per_month": "784.800",
    "price_reserved_1year_purchased_all_upfront": "3108.000",
    "price_reserved_3year_purchased_all_upfront": "5928.000"
  },
  {
    "sku": "D699FEH9K5TGKUT2",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.r3.4xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Redis",
    "vcpu": "16",
    "memory": "118 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "2.180",
    "price_per_day": "52.320",
    "price_per_month": "1569.600",
    "price_reserved_1year_purchased_all_upfront": "6216.000",
    "price_reserved_3year_purchased_all_upfront": "11856.000"
  },
  {
    "sku": "ZGKW5TSF6FFTBAB2",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.r3.8xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Redis",
    "vcpu": "32",
    "memory": "237 GiB",
    "networkPerformance": "10 Gigabit",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "4.360",
    "price_per_day": "104.640",
    "price_per_month": "3139.200",
    "price_reserved_1year_purchased_all_upfront": "12432.000",
    "price_reserved_3year_purchased_all_upfront": "23712.000"
  },
  {
    "sku": "UZ7RQF9E8VC8PAP8",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.t2.micro",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "1",
    "memory": "0.555 GiB",
    "networkPerformance": "Low to Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.020",
    "price_per_day": "0.480",
    "price_per_month": "14.400",
    "price_reserved_1year_purchased_all_upfront": "85.000",
    "price_reserved_3year_purchased_all_upfront": "158.000"
  },
  {
    "sku": "K88BM8HTPUATNCYX",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.t2.small",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "1",
    "memory": "1.55 GiB",
    "networkPerformance": "Low to Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.050",
    "price_per_day": "1.200",
    "price_per_month": "36.000",
    "price_reserved_1year_purchased_all_upfront": "170.000",
    "price_reserved_3year_purchased_all_upfront": "316.000"
  },
  {
    "sku": "FFFE4AKKQ8YTFCY4",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.t2.medium",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "2",
    "memory": "3.22 GiB",
    "networkPerformance": "Low to Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.100",
    "price_per_day": "2.400",
    "price_per_month": "72.000",
    "price_reserved_1year_purchased_all_upfront": "340.000",
    "price_reserved_3year_purchased_all_upfront": "632.000"
  },
  {
    "sku": "583Y24VM9MEQFQZ6",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m3.medium",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "1",
    "memory": "2.78 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.120",
    "price_per_day": "2.880",
    "price_per_month": "86.400",
    "price_reserved_1year_purchased_all_upfront": "244.000",
    "price_reserved_3year_purchased_all_upfront": "375.000"
  },
  {
    "sku": "8R3AX53WST8GVXRD",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m4.large",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "2",
    "memory": "6.42 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.220",
    "price_per_day": "5.280",
    "price_per_month": "158.400",
    "price_reserved_1year_purchased_all_upfront": "408.000",
    "price_reserved_3year_purchased_all_upfront": "886.000"
  },
  {
    "sku": "6YYG72UZSRCBHS73",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m3.large",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "2",
    "memory": "6.05 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.240",
    "price_per_day": "5.760",
    "price_per_month": "172.800",
    "price_reserved_1year_purchased_all_upfront": "487.000",
    "price_reserved_3year_purchased_all_upfront": "750.000"
  },
  {
    "sku": "CJKZ5DWGA6G46U2P",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m4.xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "4",
    "memory": "14.28 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.450",
    "price_per_day": "10.800",
    "price_per_month": "324.000",
    "price_reserved_1year_purchased_all_upfront": "815.000",
    "price_reserved_3year_purchased_all_upfront": "1773.000"
  },
  {
    "sku": "SH3CUT8FP4M5H6B9",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m3.xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "4",
    "memory": "13.3 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.480",
    "price_per_day": "11.520",
    "price_per_month": "345.600",
    "price_reserved_1year_purchased_all_upfront": "973.000",
    "price_reserved_3year_purchased_all_upfront": "1500.000"
  },
  {
    "sku": "EBMR8T9AHRBPPGCE",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m4.2xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "8",
    "memory": "29.7 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.900",
    "price_per_day": "21.600",
    "price_per_month": "648.000",
    "price_reserved_1year_purchased_all_upfront": "1631.000",
    "price_reserved_3year_purchased_all_upfront": "3545.000"
  },
  {
    "sku": "H94SHKPUSCX98JQB",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m3.2xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "8",
    "memory": "27.9 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.960",
    "price_per_day": "23.040",
    "price_per_month": "691.200",
    "price_reserved_1year_purchased_all_upfront": "1948.000",
    "price_reserved_3year_purchased_all_upfront": "3000.000"
  },
  {
    "sku": "7NKBU5Y9X8DAQ528",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m4.4xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "16",
    "memory": "60.78 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "1.800",
    "price_per_day": "43.200",
    "price_per_month": "1296.000",
    "price_reserved_1year_purchased_all_upfront": "3262.000",
    "price_reserved_3year_purchased_all_upfront": "7091.000"
  },
  {
    "sku": "H6RBCFGYXEGN7WYX",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m4.10xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "40",
    "memory": "154.64 GiB",
    "networkPerformance": "10 Gigabit",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "4.520",
    "price_per_day": "108.480",
    "price_per_month": "3254.400",
    "price_reserved_1year_purchased_all_upfront": "8156.000",
    "price_reserved_3year_purchased_all_upfront": "17726.000"
  },
  {
    "sku": "W3TX4U2BAQV5Y6Z7",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.c1.xlarge",
    "instanceFamily": "Compute optimized",
    "cacheEngine": "Redis",
    "vcpu": "8",
    "memory": "6.6 GiB",
    "networkPerformance": "High",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.720",
    "price_per_day": "17.280",
    "price_per_month": "518.400",
    "price_reserved_1year_purchased_all_upfront": "630.000",
    "price_reserved_3year_purchased_all_upfront": "2297.000"
  },
  {
    "sku": "29H9SEJUHMYKSTAG",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m2.xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Redis",
    "vcpu": "2",
    "memory": "16.7 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.320",
    "price_per_day": "7.680",
    "price_per_month": "230.400",
    "price_reserved_1year_purchased_all_upfront": "494.000",
    "price_reserved_3year_purchased_all_upfront": "730.000"
  },
  {
    "sku": "9JQZFMXBA5DVY5GV",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m2.2xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Redis",
    "vcpu": "4",
    "memory": "33.8 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.660",
    "price_per_day": "15.840",
    "price_per_month": "475.200",
    "price_reserved_1year_purchased_all_upfront": "812.000",
    "price_reserved_3year_purchased_all_upfront": "1233.000"
  },
  {
    "sku": "YABJESQUEGAUDF78",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m2.4xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Redis",
    "vcpu": "8",
    "memory": "68 GiB",
    "networkPerformance": "High",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "1.320",
    "price_per_day": "31.680",
    "price_per_month": "950.400",
    "price_reserved_1year_purchased_all_upfront": "1625.000",
    "price_reserved_3year_purchased_all_upfront": "1051.000"
  },
  {
    "sku": "ZWD3PGEQDTXM9QPU",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.t1.micro",
    "instanceFamily": "Micro",
    "cacheEngine": "Redis",
    "vcpu": "1",
    "memory": "0.213 GiB",
    "networkPerformance": "Very Low",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.020",
    "price_per_day": "0.480",
    "price_per_month": "14.400",
    "price_reserved_1year_purchased_all_upfront": "23.000",
    "price_reserved_3year_purchased_all_upfront": "100.000"
  },
  {
    "sku": "EPP8FFPEJUN6N6E6",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m1.small",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "1",
    "memory": "1.3 GiB",
    "networkPerformance": "Low",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.070",
    "price_per_day": "1.680",
    "price_per_month": "50.400",
    "price_reserved_1year_purchased_all_upfront": "135.000",
    "price_reserved_3year_purchased_all_upfront": "183.000"
  },
  {
    "sku": "TUJ442M8CAT5PK4A",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m1.medium",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "1",
    "memory": "3.35 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.140",
    "price_per_day": "3.360",
    "price_per_month": "100.800",
    "price_reserved_1year_purchased_all_upfront": "94.000",
    "price_reserved_3year_purchased_all_upfront": "335.000"
  },
  {
    "sku": "WDJKK4FH8CWM8EC3",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m1.large",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "2",
    "memory": "7.1 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.280",
    "price_per_day": "6.720",
    "price_per_month": "201.600",
    "price_reserved_1year_purchased_all_upfront": "538.000",
    "price_reserved_3year_purchased_all_upfront": "295.000"
  },
  {
    "sku": "SRCZHBXRNDEYP8Z5",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m1.xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Redis",
    "vcpu": "4",
    "memory": "14.6 GiB",
    "networkPerformance": "High",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.570",
    "price_per_day": "13.680",
    "price_per_month": "410.400",
    "price_reserved_1year_purchased_all_upfront": "934.000",
    "price_reserved_3year_purchased_all_upfront": "1460.000"
  },
  {
    "sku": "342M6ZV3AVTNBK2D",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.r3.large",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Memcached",
    "vcpu": "2",
    "memory": "13.5 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.270",
    "price_per_day": "6.480",
    "price_per_month": "194.400",
    "price_reserved_1year_purchased_all_upfront": "777.000",
    "price_reserved_3year_purchased_all_upfront": "1482.000"
  },
  {
    "sku": "UZDH7FCVVZWYDPQT",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.r3.xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Memcached",
    "vcpu": "4",
    "memory": "28.4 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.540",
    "price_per_day": "12.960",
    "price_per_month": "388.800",
    "price_reserved_1year_purchased_all_upfront": "1554.000",
    "price_reserved_3year_purchased_all_upfront": "2964.000"
  },
  {
    "sku": "652VJFYPUKW5PCGA",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.r3.2xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Memcached",
    "vcpu": "8",
    "memory": "58.2 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "1.090",
    "price_per_day": "26.160",
    "price_per_month": "784.800",
    "price_reserved_1year_purchased_all_upfront": "3108.000",
    "price_reserved_3year_purchased_all_upfront": "5928.000"
  },
  {
    "sku": "2Q7S2GKE8R6YJK6Z",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.r3.4xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Memcached",
    "vcpu": "16",
    "memory": "118 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "2.180",
    "price_per_day": "52.320",
    "price_per_month": "1569.600",
    "price_reserved_1year_purchased_all_upfront": "6216.000",
    "price_reserved_3year_purchased_all_upfront": "11856.000"
  },
  {
    "sku": "DGJ4S737HQCSGHFR",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.r3.8xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Memcached",
    "vcpu": "32",
    "memory": "237 GiB",
    "networkPerformance": "10 Gigabit",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "4.360",
    "price_per_day": "104.640",
    "price_per_month": "3139.200",
    "price_reserved_1year_purchased_all_upfront": "12432.000",
    "price_reserved_3year_purchased_all_upfront": "23712.000"
  },
  {
    "sku": "P6FZ9WKXFTVN2Q3B",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.t2.micro",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "1",
    "memory": "0.555 GiB",
    "networkPerformance": "Low to Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.020",
    "price_per_day": "0.480",
    "price_per_month": "14.400",
    "price_reserved_1year_purchased_all_upfront": "85.000",
    "price_reserved_3year_purchased_all_upfront": "158.000"
  },
  {
    "sku": "GN8YA9RF8JSNEJZQ",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.t2.small",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "1",
    "memory": "1.55 GiB",
    "networkPerformance": "Low to Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.050",
    "price_per_day": "1.200",
    "price_per_month": "36.000",
    "price_reserved_1year_purchased_all_upfront": "170.000",
    "price_reserved_3year_purchased_all_upfront": "316.000"
  },
  {
    "sku": "D9KG5GUB2SKVYK27",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.t2.medium",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "2",
    "memory": "3.22 GiB",
    "networkPerformance": "Low to Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.100",
    "price_per_day": "2.400",
    "price_per_month": "72.000",
    "price_reserved_1year_purchased_all_upfront": "340.000",
    "price_reserved_3year_purchased_all_upfront": "632.000"
  },
  {
    "sku": "44KBGQ22QKTPNXXV",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m3.medium",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "1",
    "memory": "2.78 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.120",
    "price_per_day": "2.880",
    "price_per_month": "86.400",
    "price_reserved_1year_purchased_all_upfront": "244.000",
    "price_reserved_3year_purchased_all_upfront": "375.000"
  },
  {
    "sku": "GPC3DRRV4KGDPGWA",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m4.large",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "2",
    "memory": "6.42 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.220",
    "price_per_day": "5.280",
    "price_per_month": "158.400",
    "price_reserved_1year_purchased_all_upfront": "408.000",
    "price_reserved_3year_purchased_all_upfront": "886.000"
  },
  {
    "sku": "4TCRM5QJNQYVPXFP",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m3.large",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "2",
    "memory": "6.05 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.240",
    "price_per_day": "5.760",
    "price_per_month": "172.800",
    "price_reserved_1year_purchased_all_upfront": "487.000",
    "price_reserved_3year_purchased_all_upfront": "750.000"
  },
  {
    "sku": "N4WW6KA8NZBRR3NH",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m4.xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "4",
    "memory": "14.28 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.450",
    "price_per_day": "10.800",
    "price_per_month": "324.000",
    "price_reserved_1year_purchased_all_upfront": "815.000",
    "price_reserved_3year_purchased_all_upfront": "1773.000"
  },
  {
    "sku": "SUSKRNJJK69G5HDW",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m3.xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "4",
    "memory": "13.3 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.480",
    "price_per_day": "11.520",
    "price_per_month": "345.600",
    "price_reserved_1year_purchased_all_upfront": "973.000",
    "price_reserved_3year_purchased_all_upfront": "1500.000"
  },
  {
    "sku": "SE4JAQGCM25B4TD2",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m4.2xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "8",
    "memory": "29.7 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.900",
    "price_per_day": "21.600",
    "price_per_month": "648.000",
    "price_reserved_1year_purchased_all_upfront": "1631.000",
    "price_reserved_3year_purchased_all_upfront": "3545.000"
  },
  {
    "sku": "HBRQZSXXSY2DXJ77",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m3.2xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "8",
    "memory": "27.9 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "0.960",
    "price_per_day": "23.040",
    "price_per_month": "691.200",
    "price_reserved_1year_purchased_all_upfront": "1948.000",
    "price_reserved_3year_purchased_all_upfront": "3000.000"
  },
  {
    "sku": "YA9P99UTEHT9CHMG",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m4.4xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "16",
    "memory": "60.78 GiB",
    "networkPerformance": "High",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "1.800",
    "price_per_day": "43.200",
    "price_per_month": "1296.000",
    "price_reserved_1year_purchased_all_upfront": "3262.000",
    "price_reserved_3year_purchased_all_upfront": "7091.000"
  },
  {
    "sku": "K2G93QRZGQUZAPXX",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m4.10xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "40",
    "memory": "154.64 GiB",
    "networkPerformance": "10 Gigabit",
    "currentGeneration": "Yes",
    "price_unit": "USD",
    "price_per_hour": "4.520",
    "price_per_day": "108.480",
    "price_per_month": "3254.400",
    "price_reserved_1year_purchased_all_upfront": "8156.000",
    "price_reserved_3year_purchased_all_upfront": "17726.000"
  },
  {
    "sku": "TEKCZZ47V9EVMKS8",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.c1.xlarge",
    "instanceFamily": "Compute optimized",
    "cacheEngine": "Memcached",
    "vcpu": "8",
    "memory": "6.6 GiB",
    "networkPerformance": "High",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.720",
    "price_per_day": "17.280",
    "price_per_month": "518.400",
    "price_reserved_1year_purchased_all_upfront": "1495.000",
    "price_reserved_3year_purchased_all_upfront": "2297.000"
  },
  {
    "sku": "7EAKMAGDZW5M6SRD",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m2.xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Memcached",
    "vcpu": "2",
    "memory": "16.7 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.320",
    "price_per_day": "7.680",
    "price_per_month": "230.400",
    "price_reserved_1year_purchased_all_upfront": "494.000",
    "price_reserved_3year_purchased_all_upfront": "616.000"
  },
  {
    "sku": "5R2X6S6W3E9QUXCA",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m2.2xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Memcached",
    "vcpu": "4",
    "memory": "33.8 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.660",
    "price_per_day": "15.840",
    "price_per_month": "475.200",
    "price_reserved_1year_purchased_all_upfront": "989.000",
    "price_reserved_3year_purchased_all_upfront": "526.000"
  },
  {
    "sku": "6KQX8YK6Z5JVH6AP",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m2.4xlarge",
    "instanceFamily": "Memory optimized",
    "cacheEngine": "Memcached",
    "vcpu": "8",
    "memory": "68 GiB",
    "networkPerformance": "High",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "1.320",
    "price_per_day": "31.680",
    "price_per_month": "950.400",
    "price_reserved_1year_purchased_all_upfront": "1625.000",
    "price_reserved_3year_purchased_all_upfront": "2467.000"
  },
  {
    "sku": "H67TVHGJJKCSP8V3",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.t1.micro",
    "instanceFamily": "Micro",
    "cacheEngine": "Memcached",
    "vcpu": "1",
    "memory": "0.213 GiB",
    "networkPerformance": "Very Low",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.020",
    "price_per_day": "0.480",
    "price_per_month": "14.400",
    "price_reserved_1year_purchased_all_upfront": "23.000",
    "price_reserved_3year_purchased_all_upfront": "82.000"
  },
  {
    "sku": "F93DXZNTUZPUYW57",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m1.small",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "1",
    "memory": "1.3 GiB",
    "networkPerformance": "Low",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.070",
    "price_per_day": "1.680",
    "price_per_month": "50.400",
    "price_reserved_1year_purchased_all_upfront": "135.000",
    "price_reserved_3year_purchased_all_upfront": "207.000"
  },
  {
    "sku": "42W2WEUS7WSVTC8Z",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m1.medium",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "1",
    "memory": "3.35 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.140",
    "price_per_day": "3.360",
    "price_per_month": "100.800",
    "price_reserved_1year_purchased_all_upfront": "94.000",
    "price_reserved_3year_purchased_all_upfront": "335.000"
  },
  {
    "sku": "UNFBU4PQBQS7MPRE",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m1.large",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "2",
    "memory": "7.1 GiB",
    "networkPerformance": "Moderate",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.280",
    "price_per_day": "6.720",
    "price_per_month": "201.600",
    "price_reserved_1year_purchased_all_upfront": "538.000",
    "price_reserved_3year_purchased_all_upfront": "826.000"
  },
  {
    "sku": "HPNGZPPFM3X4CC9E",
    "location": "Asia Pacific (Tokyo)",
    "instanceType": "cache.m1.xlarge",
    "instanceFamily": "Standard",
    "cacheEngine": "Memcached",
    "vcpu": "4",
    "memory": "14.6 GiB",
    "networkPerformance": "High",
    "currentGeneration": "No",
    "price_unit": "USD",
    "price_per_hour": "0.570",
    "price_per_day": "13.680",
    "price_per_month": "410.400",
    "price_reserved_1year_purchased_all_upfront": "934.000",
    "price_reserved_3year_purchased_all_upfront": "1460.000"
  }
]