Created
October 22, 2020 10:54
-
-
Save mjaromi/b6bfef13214c94a37895b71b90ea997e to your computer and use it in GitHub Desktop.
Show Amazon EC2 On-Demand Pricing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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