Skip to content

Instantly share code, notes, and snippets.

@akash1810
Created June 3, 2015 14:54
Show Gist options
  • Save akash1810/38643b18ccd1cfc63c3f to your computer and use it in GitHub Desktop.
Save akash1810/38643b18ccd1cfc63c3f to your computer and use it in GitHub Desktop.
AWS EC2 Public DNS from Private IP
#!/bin/sh
aws ec2 describe-instances --filters "Name=private-ip-address,Values=$1" | jq -c '.Reservations[0].Instances[].PublicDnsName'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment