Skip to content

Instantly share code, notes, and snippets.

@SofianeHamlaoui
Created June 28, 2022 09:52
Show Gist options
  • Save SofianeHamlaoui/09af5a7807a91c7e3b82ec805a7358ee to your computer and use it in GitHub Desktop.
Save SofianeHamlaoui/09af5a7807a91c7e3b82ec805a7358ee to your computer and use it in GitHub Desktop.
Get AWS Instance IP
#!/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