Created
June 11, 2021 02:04
-
-
Save srkiNZ84/c737de02fc1f3a4a0e2f265f117e0648 to your computer and use it in GitHub Desktop.
Get AWS EC2 instances using AWS CLI query param
This file contains 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
#!/bin/bash | |
aws --profile dev \ | |
ec2 describe-instances \ | |
--query 'Reservations[].Instances[].[InstanceId,Tags[?Key==`Name`].Value[],NetworkInterfaces[].Association.{IP:PublicIp}]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment