Skip to content

Instantly share code, notes, and snippets.

@mjaromi
Created October 22, 2020 10:54
Show Gist options
  • Save mjaromi/b6bfef13214c94a37895b71b90ea997e to your computer and use it in GitHub Desktop.
Save mjaromi/b6bfef13214c94a37895b71b90ea997e to your computer and use it in GitHub Desktop.
Show Amazon EC2 On-Demand Pricing
#!/bin/bash
awsRegion=$1
instanceType=$2
url=https://banzaicloud.com/cloudinfo/api/v1/providers/amazon/services/compute/regions/${awsRegion}/products
curl -ksLX GET ${url} | jq ".products[] | select(.type | contains(\"${instanceType}\")) | .onDemandPrice"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment