Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Yesterday's AWS Costs
aws ce get-cost-and-usage \
--granularity DAILY \
--time-period Start=$(date -v-1d +%Y-%m-%d),End=$(date +%Y-%m-%d) \
--metrics UnblendedCost \
| jq -r '.ResultsByTime[].Total.UnblendedCost.Amount' \
| ruby -e 'puts "$#{gets.to_f.round(2)}"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.