Last active
July 5, 2018 10:02
-
-
Save sanketsudake/b73ec34637bdd3c1e0961659e26b10ea to your computer and use it in GitHub Desktop.
List ALL AWS Instances
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for region in `aws ec2 describe-regions --output text | cut -f3` | |
| do | |
| echo -e "Instances in region:'$region'..." | |
| aws ec2 describe-instances --region $region --query 'Reservations[].Instances[].[State.Name,KeyName,InstanceType,Tags[].Value,PublicIpAddress]' | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment