Created
February 14, 2018 04:12
-
-
Save reecestart/1c0e99bd75002f2bbf4914a7f8fcebc1 to your computer and use it in GitHub Desktop.
Bash script to get the RI Utilization given a start and end date, granularity either daily or monthly
This file contains hidden or 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
#!/usr/bin/env | |
# To check RI Utilization | |
echo "What is your Start Date for checking RI Utilization? (YYYY-MM-DD)" | |
read startDate | |
startDateString="Start=$startDate" | |
echo "What is your End Date for checking RI Utilization? (YYYY-MM-DD)" | |
read endDate | |
endDateString="End=$endDate" | |
timePeriod="$startDateString,$endDateString" | |
echo "What granularity are you interested in? (DAILY or MONTHLY)" | |
read granularity | |
aws ce get-reservation-utilization --region us-east-1 --time-period $timePeriod --granularity $granularity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment