Created
March 2, 2020 07:57
-
-
Save zmx/48e6ebadf19593c11e0a6cc163127750 to your computer and use it in GitHub Desktop.
Get AWS EC2 instance IP address in /etc/hosts format
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
aws ec2 describe-instances --filters "Name=tag:Name,Values=bill*" --query 'Reservations[].Instances[].[PublicIpAddress,Tags[?Key==`Name`]| [0].Value]' --output text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment