Advertisement
Javi

AWS: cli for listing services in region

Apr 28th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. # Services in region
  2.  
  3.  
  4. ## Activated services
  5.  
  6. aws ssm get-parameters-by-path \
  7. --path /aws/service/global-infrastructure/regions/eu-west-1/services \
  8. --output json \
  9. --query Parameters[].Name
  10.  
  11. ## Services actually used
  12.  
  13. aws ce get-cost-and-usage \
  14. --time-period Start=2020-04-01,End=2020-04-28 \
  15. --granularity MONTHLY \
  16. --metrics "UsageQuantity" \
  17. --group-by Type=DIMENSION,Key=SERVICE Type=DIMENSION,Key=REGION \
  18. --output json \
  19. --query ResultsByTime[].Groups[].Keys[]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement