Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jwatson3d/29bfd7c88f1870c7424c9170245423f9 to your computer and use it in GitHub Desktop.
Save jwatson3d/29bfd7c88f1870c7424c9170245423f9 to your computer and use it in GitHub Desktop.

Revisions

  1. jwatson3d created this gist Jun 10, 2023.
    1 change: 1 addition & 0 deletions awsCostExplorerHighestServiceByMonth.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    aws ce get-cost-and-usage --time-period Start=2022-12-01,End=2022-12-31 --granularity MONTHLY --metrics UsageQuantity --group-by Type=DIMENSION,Key=SERVICE | jq '.ResultsByTime[].Groups[] | select(.Metrics.UsageQuantity.Amount > 0) | .Keys[0]'