Created
June 28, 2022 09:52
-
-
Save SofianeHamlaoui/09af5a7807a91c7e3b82ec805a7358ee to your computer and use it in GitHub Desktop.
Get AWS Instance IP
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
#!/bin/bash | |
echo "Instance Name ?" | |
read name | |
aws ec2 describe-instances --filters 'Name=tag:Name,Values='$name --query 'Reservations[*] .Instances[*].PublicIpAddress' --output text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment