From 2d8eee4e479a848c1dc80cc90be3127a16f9b762 Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Tue, 5 Mar 2024 18:00:04 +0000 Subject: [PATCH] Autosave: 2024-03-05 18:00:04 --- zk/AWS_CLI.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zk/AWS_CLI.md b/zk/AWS_CLI.md index c54a154..66dc9b6 100644 --- a/zk/AWS_CLI.md +++ b/zk/AWS_CLI.md @@ -38,3 +38,12 @@ aws cloudformation delete-stack --stack-name --region ``` `region` is optional especially if only deployed to one region + +## Billing ("Cost explorer") + +### Usage for month + +``` + aws ce get-cost-and-usage --time-period Start=$(date +%Y-%m-01),End=$(date -d @$(( $(date +%s) + 86400 )) +%Y-%m-%d) --granularity MONTHLY --metrics "UnblendedCost" "UsageQuantity + +```