Just a small bash snippet for those cases where, for example, a command returns AWS instance IDs but not the matching DNS names or an IP addresses. The function id2dns, that you can add to your .bashrc file, will do the translation for you. In order to use the function you will:
- ensure you have the aws CLI installed and functional;
ensure you have jq command available;- ensure you have valid AWS credentials set, so that your aws CLI will work.
Enjoy!
Update 2020-08-14: jq not needed any more