aws ce get-cost-and-usage \
--time-period "Start=$(printf "%(%Y-%m-%d)T" "$(($(date +%s)-(60*60*48)))"),End=$(date +%Y-%m-%d)" \
--granularity MONTHLY \
--metrics "UsageQuantity" \
--group-by Type=DIMENSION,Key=REGION \
--output json \
--filter '{"And":[{"Dimensions":{"Key":"SERVICE","Values":["Amazon Elastic Compute Cloud - Compute"]}},{"Dimensions":{"Key":"RECORD_TYPE","Values":["Usage"]}},{"Not":{"Dimensions":{"Key":"INSTANCE_TYPE","Values":[""]}}}]}' \
| jq -re '[.ResultsByTime[].Groups[].Keys|add]|unique[]|select(. != "global")'