File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # ##################################################################
4+ # # @version 1.0.0
5+ # # @script aws_cost.sh
6+ # # @author lamhaison
7+ 8+ # # @description Description detail about the script
9+ # # @bash_version None
10+ # # @notes None
11+ # # @usage Only use function in the script instead of bash aws_config.sh
12+ # # @date YYYYMMDD
13+ # ##################################################################
14+
15+ function aws_cost_list_months_later() {
16+ # Default is 6 months
17+ local months=${1:- ' 6' }
18+ aws ce get-cost-and-usage \
19+ --time-period " Start=$( date -d " ${months} months ago" +%Y-%m-01) ,End=$( date -d " $( date +%Y-%m-01) -1 day" +%Y-%m-%d) " \
20+ --granularity MONTHLY --metrics " UnblendedCost"
21+ }
You can’t perform that action at this time.
0 commit comments