Created
September 22, 2020 03:09
-
-
Save HieronyM/9e8a4f84d09d7ffdec7ffd08c0699d42 to your computer and use it in GitHub Desktop.
List ec2 instances information based on specific filter, and output them into .csv file
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
| aws --profile sdsdevelmanager ec2 describe-instances --filters "Name=tag:Domain, Values=PRODUCTION-GOLD"\ | |
| --query 'Reservations[*].Instances[*].[ [Tags[?Key==`Name`].Value] [0][0], [Tags[?Key==`Domain`].Value] [0][0], InstanceId, PublicIpAddress, PrivateIpAddress, InstanceType, Placement.AvailabilityZone ]'\ | |
| --output text > instances.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment