Advertisement
Javi

AWS: Check resource existance

Mar 16th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. regions=$(aws ec2 describe-regions --profile awslabs --region us-east-1 --query Regions[].RegionName --output text)
  4.  
  5. for region in $regions; do
  6. echo Checking $region
  7. aws rds describe-db-instances --region $region --profile awslabs --output text
  8. aws ec2 describe-instances --region $region --profile awslabs --output text
  9. aws ec2 describe-nat-gateways --region $region --profile awslabs --output text
  10. aws elb describe-load-balancers --region $region --profile awslabs --output text
  11. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement