It’s been a while since I’ve written about code, so I thought I’d post this little AWS-related tip for OS X and Linux users. If you have the Unified AWS CLI Tools configured, you can add these functions to your Bash profile (typically either ~/.bash_profile or ~/.profile) to enable you to SSH into an instance by “Name” tag, or simply lookup the IP address or DNS hostname. hostname_from_instance <instance-name> ip_from_instance <instance-name> ssh-aws <instance-name> Bash code function hostname_from_instance() { echo $(aws ec2 describe-instances --filters "{\"Name\":\"tag:Name\", \"Values\":[\"$1\"]}" --query='Reservations[0].
Below you will find pages that utilize the taxonomy term “jmespath”.