Skip to content

Instantly share code, notes, and snippets.

@ThabetAmer
Created February 3, 2020 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThabetAmer/7cc2ffd74b9a63ec1b09785345d967e6 to your computer and use it in GitHub Desktop.
Save ThabetAmer/7cc2ffd74b9a63ec1b09785345d967e6 to your computer and use it in GitHub Desktop.
Returns host IP for AWS EC2
#!/bin/bash
# Returns host IP for AWS EC2
curl http://169.254.169.254/latest/meta-data/public-ipv4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment